-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TS] Implement support for SEP-7 (#141)
* Implement support for Sep-7 * Add a couple missing exceptions * Assign a few missing types * Add JSDocs for Sep7 classes * Add JSDocs for sep7Parser file * Make isValidSep7Uri also return a "reason" message for failed verifications * Augment tests to account for error reasons strings * Comment tweak
- Loading branch information
Showing
15 changed files
with
1,814 additions
and
11 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
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
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
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
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
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
19 changes: 19 additions & 0 deletions
19
@stellar/typescript-wallet-sdk/src/walletSdk/Types/sep7.ts
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,19 @@ | ||
export const WEB_STELLAR_SCHEME = "web+stellar:"; | ||
|
||
export enum Sep7OperationType { | ||
tx = "tx", | ||
pay = "pay", | ||
} | ||
|
||
export const URI_MSG_MAX_LENGTH = 300; | ||
|
||
export type Sep7Replacement = { | ||
id: string; | ||
path: string; | ||
hint: string; | ||
}; | ||
|
||
export type IsValidSep7UriResult = { | ||
result: boolean; | ||
reason?: string; | ||
}; |
Oops, something went wrong.