Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to Test SEP-8 Payments #170

Merged
merged 4 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<paste_your_address_here>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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=<paste_your_address_here>`.
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=<paste_your_address_here>`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording in 6bb496a.

5. Select "SEP-8 Send" from the dropdown for MYASSET and click "Start" in the modal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Select "SEP-8 Send" from the dropdown for MYASSET and click "Start" in the modal.
5. Select "SEP-8 Send" from the dropdown of MYASSET and click "Start" in the modal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording in 6bb496a.

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we remember to update this address when the testnet resets?

Copy link
Contributor Author

@marcelosalloum marcelosalloum May 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I'll remove the reference to that address so we don't risk the documentation becoming outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the sentence about the existing address in 6bb496a.

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.


### 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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/methods/sep8Send/submitRevisedTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};