-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7c0b24
commit 4075cd3
Showing
9 changed files
with
776 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
# SEP-0030 - Account Recovery: multi-party recovery of Stellar accounts | ||
|
||
Enables an individual (e.g., a user or wallet) to regain access to a Stellar account as defined by | ||
[SEP-0030: Account Recovery](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0030.md). | ||
|
||
|
||
## Create a SEP30RecoveryService instance | ||
|
||
**By providing the recovery server url directly via the constructor:** | ||
|
||
```dart | ||
final service = SEP30RecoveryService("http://api.stellar-test.org/recovery"); | ||
``` | ||
|
||
## Register an account | ||
|
||
```dart | ||
var request = SEP30Request([senderIdentity, receiverIdentity]); | ||
SEP30AccountResponse response = await service.registerAccount(addressA, request, jwtToken); | ||
``` | ||
|
||
## Update identities for an account | ||
|
||
```dart | ||
var request = SEP30Request([sender2Identity, receiver2Identity]); | ||
SEP30AccountResponse response = await service.updateIdentitiesForAccount(addressA, request, jwtToken); | ||
``` | ||
|
||
## Sign a transaction | ||
|
||
```dart | ||
var transaction = "AAAAAHAHhQtYBh5F2zA6..."; | ||
SEP30SignatureResponse response = await service.signTransaction( | ||
addressA, signingAddress, transaction, jwtToken); | ||
``` | ||
|
||
## Get account details | ||
|
||
```dart | ||
SEP30AccountResponse response = await service.accountDetails(addressA, jwtToken); | ||
``` | ||
|
||
## Delete account | ||
|
||
```dart | ||
SEP30AccountResponse response = await service.deleteAccount(addressA, jwtToken); | ||
``` | ||
|
||
|
||
## List accounts | ||
|
||
```dart | ||
SEP30AccountsResponse response = await service.accounts(jwtToken, | ||
after: "GA5TKKASNJZGZAP6FH65HO77CST7CJNYRTW4YPBNPXYMZAHHMTHDZKDQ"); | ||
``` | ||
|
||
### Further readings | ||
|
||
SDK's [SEP-30 test cases](https://github.com/Soneso/stellar_flutter_sdk/blob/master/test/sep0030_test.dart). | ||
|
Oops, something went wrong.