From b08a0b9bac7b11ec424236386dc409f93037b704 Mon Sep 17 00:00:00 2001 From: Marcelo Salloum Date: Mon, 24 May 2021 15:34:11 -0300 Subject: [PATCH 1/4] Add instructions to test SEP-8 and include links to the other SEPs. --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8fdafba4..87013db4 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,22 @@ feel free to clone or copy any pieces that may be helpful. ## Getting A Test Account Up and Running -You can use the demo wallet to test Hosted Deposit and Withdrawal (SEP-24) and Cross-Border Payments (SEP-31) with any home domain that has a Stellar Info File (also known as SEP-1, or a stellar.toml file). The instructions below are for demo-ing standard integrations supported by Stellar test server, testanchor.stellar.org. For both integrations, the logs to the right of the screen will show every network call. +You can use the demo wallet to test Regulated Assets ([SEP-8]), Hosted Deposit and Withdrawal ([SEP-24]) and Cross-Border Payments ([SEP-31]) with any home domain that has a Stellar Info File (also known as [SEP-1], or a stellar.toml file). The instructions below are for demo-ing standard integrations supported by Stellar test server, testanchor.stellar.org or by the [SEP-8] reference server, sep8-server.dev.stellar.org. For these integrations, the logs to the right of the screen will show every network call. + +### Demo-ing a Regulated Asset Payment ([SEP-8]) -### Demo-ing a Deposit on Testnet with Hosted Deposit and Withdrawal (SEP-24) +1. Click "Generate keypair", and then click "Create account" - this will create a balance of 10,000 XLM. +2. Click “Add asset” and add `MYASSET` with the anchor home domain `sep8-server.dev.stellar.org`. +3. Click “Add trustline” - this will allow you to hold MYASSET. +4. Click in the "Copy" link at the right of your public key and use that value to get some unities of MYASSET using the link `https://sep8-server.dev.stellar.org/friendbot?addr=`. +5. Select "SEP-8 Send" from the dropdown for MYASSET and click "Start" in the modal. +6. In the "destination" field input an address that also have a trustline to MYASSET. You can use this destination address for if you don't have one: `GBID36ML6VVNPIF6SQATQW5QIBREQAVEHQIUMWDLQCSVIYX2IJGK4KPP`. +7. The modal will display the approval criteria used by our SEP-8 server. Depending on the conditions described there your payment can be automatically approved or you may be required to undergo an additional KYC step. +8. After your payment gets revised and signed by the SEP-8 reference server you'll need to review the updated transaction before the demo wallet submits the payment. +9. If the payment has been successfully sent you'll see "SEP-8 send payment completed 🎉" in the logs. + + +### Demo-ing a Deposit on Testnet with Hosted Deposit and Withdrawal ([SEP-24]) 1. Click "Generate keypair", and then click "Create account" - this will create a balance of 10,000 XLM. 2. Click “Add asset” and add `SRT` (this stands for Stellar Reference Token, it’s our representation of XLM for the test server) with the anchor home domain `testanchor.stellar.org`. 3. Click “Add trustline” - this will allow you to hold SRT. @@ -29,7 +42,7 @@ You can use the demo wallet to test Hosted Deposit and Withdrawal (SEP-24) and C 8. Enter a number into the amount and click "Submit". 9. Leave the pop-up window open while you wait to see the deposit of SRT go through - you can close when you see “Status” is complete and you have SRT. -### Demo-ing Cross-Border Payments (SEP-31) on Testnet +### Demo-ing Cross-Border Payments ([SEP-31]) on Testnet 1. Follow the steps above in order to establish an amount of SRT to send. 2. Select “SEP-31 Send” from the dropdown for your SRT asset and click "Start" in the modal. 3. Enter the requested information in the pop-up - none of the info has to be real for this testanchor.stellar.org demo, this is only to show the fields required. When testing another anchor you may need to adhere to their validation requirements. @@ -73,3 +86,8 @@ yarn build - [https://www.stellar.org/developers](https://www.stellar.org/developers) - [https://stellar.github.io/js-stellar-sdk/](https://stellar.github.io/js-stellar-sdk/) - [https://github.com/stellar/js-stellar-sdk](https://github.com/stellar/js-stellar-sdk) + +[SEP-1]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0001.md +[SEP-8]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0008.md +[SEP-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md +[SEP-31]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md From 9b7b52dbd1c6f3a27c4c91793c5ce944b476d960 Mon Sep 17 00:00:00 2001 From: Marcelo Salloum Date: Mon, 24 May 2021 15:34:30 -0300 Subject: [PATCH 2/4] Update log text to be consistent with SEP-31. --- src/methods/sep8Send/submitRevisedTransaction.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/methods/sep8Send/submitRevisedTransaction.ts b/src/methods/sep8Send/submitRevisedTransaction.ts index 7aee14e3..435e33d0 100644 --- a/src/methods/sep8Send/submitRevisedTransaction.ts +++ b/src/methods/sep8Send/submitRevisedTransaction.ts @@ -50,8 +50,8 @@ export const submitRevisedTransaction = async ({ ); log.response({ title: "Submitted send payment transaction", body: result }); log.instruction({ - title: `Payment of ${amount} ${assetCode} sent 🎉`, - body: `Destination: ${destination}`, + title: "SEP-8 send payment completed 🎉", + body: `Payment of ${amount} ${assetCode} successfully sent to ${destination}`, }); return result; }; From 4507548968d23815b9275f4e470b7108d46ddf72 Mon Sep 17 00:00:00 2001 From: Marcelo Salloum Date: Mon, 24 May 2021 15:49:19 -0300 Subject: [PATCH 3/4] Improve wording. --- README.md | 4 ++-- src/methods/sep8Send/submitRevisedTransaction.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 87013db4..ba1193f9 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ You can use the demo wallet to test Regulated Assets ([SEP-8]), Hosted Deposit a 3. Click “Add trustline” - this will allow you to hold MYASSET. 4. Click in the "Copy" link at the right of your public key and use that value to get some unities of MYASSET using the link `https://sep8-server.dev.stellar.org/friendbot?addr=`. 5. Select "SEP-8 Send" from the dropdown for MYASSET and click "Start" in the modal. -6. In the "destination" field input an address that also have a trustline to MYASSET. You can use this destination address for if you don't have one: `GBID36ML6VVNPIF6SQATQW5QIBREQAVEHQIUMWDLQCSVIYX2IJGK4KPP`. -7. The modal will display the approval criteria used by our SEP-8 server. Depending on the conditions described there your payment can be automatically approved or you may be required to undergo an additional KYC step. +6. In the "destination" field, input an address that also has a trustline to MYASSET. You can use this destination address for it if you don't have one: `GBID36ML6VVNPIF6SQATQW5QIBREQAVEHQIUMWDLQCSVIYX2IJGK4KPP`. +7. The modal will display the approval criteria used by the SEP-8 server. Depending on the conditions described there your payment can be automatically approved or you may be required to undergo an additional KYC step. 8. After your payment gets revised and signed by the SEP-8 reference server you'll need to review the updated transaction before the demo wallet submits the payment. 9. If the payment has been successfully sent you'll see "SEP-8 send payment completed 🎉" in the logs. diff --git a/src/methods/sep8Send/submitRevisedTransaction.ts b/src/methods/sep8Send/submitRevisedTransaction.ts index 435e33d0..92c2557d 100644 --- a/src/methods/sep8Send/submitRevisedTransaction.ts +++ b/src/methods/sep8Send/submitRevisedTransaction.ts @@ -51,7 +51,7 @@ export const submitRevisedTransaction = async ({ log.response({ title: "Submitted send payment transaction", body: result }); log.instruction({ title: "SEP-8 send payment completed 🎉", - body: `Payment of ${amount} ${assetCode} successfully sent to ${destination}`, + body: `Payment of ${amount} ${assetCode} successfully sent to ${destination}.`, }); return result; }; From 6bb496a8fc971419c445d8277efa57ca51cb3d1c Mon Sep 17 00:00:00 2001 From: Marcelo Salloum Date: Tue, 25 May 2021 09:37:17 -0300 Subject: [PATCH 4/4] Update instructions based on code review. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba1193f9..c2bcd355 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ You can use the demo wallet to test Regulated Assets ([SEP-8]), Hosted Deposit a 1. Click "Generate keypair", and then click "Create account" - this will create a balance of 10,000 XLM. 2. Click “Add asset” and add `MYASSET` with the anchor home domain `sep8-server.dev.stellar.org`. 3. Click “Add trustline” - this will allow you to hold MYASSET. -4. Click in the "Copy" link at the right of your public key and use that value to get some unities of MYASSET using the link `https://sep8-server.dev.stellar.org/friendbot?addr=`. -5. Select "SEP-8 Send" from the dropdown for MYASSET and click "Start" in the modal. -6. In the "destination" field, input an address that also has a trustline to MYASSET. You can use this destination address for it if you don't have one: `GBID36ML6VVNPIF6SQATQW5QIBREQAVEHQIUMWDLQCSVIYX2IJGK4KPP`. +4. Click on the "Copy" link on the right of your public key and use that value to get some unities of MYASSET using the link `https://sep8-server.dev.stellar.org/friendbot?addr=`. +5. Select "SEP-8 Send" from the dropdown of MYASSET and click "Start" in the modal. +6. In the "destination" field, input an address that also has a trustline to MYASSET. 7. The modal will display the approval criteria used by the SEP-8 server. Depending on the conditions described there your payment can be automatically approved or you may be required to undergo an additional KYC step. 8. After your payment gets revised and signed by the SEP-8 reference server you'll need to review the updated transaction before the demo wallet submits the payment. 9. If the payment has been successfully sent you'll see "SEP-8 send payment completed 🎉" in the logs.