-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: support --yes on forge reset * fix: js2dts dependency * chore: upgrade forge-proto with forge v0.27.0 * chore: upgrade grpc-client with forge v0.27.0 * chore: upgrade graphql-client with forge v0.27.0 * chore: add fromHash and fromPublicKeyHash for did * feat: support new asset address generating algorithm * chore: update dts and cleanup test case * chore: upgrade sdk-util dependency version * chore: bump version
- Loading branch information
1 parent
6518d84
commit 75d414f
Showing
47 changed files
with
8,809 additions
and
5,474 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
TOP_DIR=. | ||
README=$(TOP_DIR)/README.md | ||
SDK_VERSION=0.25 | ||
SDK_VERSION=0.27 | ||
|
||
VERSION=$(strip $(shell cat version)) | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,41 @@ | ||
// Generate by [[email protected].2](https://github.com/whxaxes/js2dts#readme) | ||
// Generate by [[email protected].3](https://github.com/whxaxes/js2dts#readme) | ||
|
||
/** | ||
* Create an asset address, eg: the did of an asset | ||
* Create an asset address | ||
* | ||
* @public | ||
* @static | ||
* @param {object} itx - an object of `CreateAssetTx` | ||
* @param {string} sender - creator address, also the initial owner of the asset | ||
* @returns {string} asset address without `did:abt:` prefix | ||
*/ | ||
declare function toAssetAddress(itx: any, sender: string): string; | ||
declare function toAssetAddress(itx: any): string; | ||
/** | ||
* Create an asset did | ||
* | ||
* @public | ||
* @static | ||
* @param {object} itx - an object of `CreateAssetTx` | ||
* @returns {string} asset address without `did:abt:` prefix | ||
*/ | ||
declare function toAssetDid(itx: any): string; | ||
/** | ||
* Create an itx address | ||
* | ||
* @public | ||
* @static | ||
* @param {object} itx - an object of forge supported itx | ||
* @returns {string} itx address without `did:abt:` prefix | ||
*/ | ||
declare function toItxAddress(itx: any, type: any): string; | ||
/** | ||
* Create an itx did | ||
* | ||
* @public | ||
* @static | ||
* @param {object} itx - an object of forge supported itx | ||
* @returns {string} itx address without `did:abt:` prefix | ||
*/ | ||
declare function toItxDid(itx: any, type: any): string; | ||
/** | ||
* Generate an stake address, eg: the did of the stake | ||
* | ||
|
@@ -20,11 +46,25 @@ declare function toAssetAddress(itx: any, sender: string): string; | |
* @returns {string} stake address without `did:abt:` prefix | ||
*/ | ||
declare function toStakeAddress(sender: string, receiver: string): string; | ||
/** | ||
* Generate an stake address, eg: the did of the stake | ||
* | ||
* @public | ||
* @static | ||
* @param {string} sender - sender address | ||
* @param {string} receiver - receiver address | ||
* @returns {string} stake address without `did:abt:` prefix | ||
*/ | ||
declare function toStakeDid(sender: string, receiver: string): string; | ||
declare const _Lib: _Lib.T100; | ||
declare namespace _Lib { | ||
export interface T100 { | ||
toAssetAddress: typeof toAssetAddress; | ||
toAssetDid: typeof toAssetDid; | ||
toItxAddress: typeof toItxAddress; | ||
toItxDid: typeof toItxDid; | ||
toStakeAddress: typeof toStakeAddress; | ||
toStakeDid: typeof toStakeDid; | ||
} | ||
} | ||
export = _Lib; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Generate by [[email protected].2](https://github.com/whxaxes/js2dts#readme) | ||
// Generate by [[email protected].3](https://github.com/whxaxes/js2dts#readme) | ||
|
||
/** | ||
* Convert did to address: remove `did:abt:` prefix if exists | ||
|
@@ -25,6 +25,8 @@ declare namespace _Lib { | |
toStrictHex: (hex: string, length: number) => string; | ||
fromSecretKey: (sk: string, type: any) => string; | ||
fromPublicKey: (pk: string, type: any) => string; | ||
fromPublicKeyHash: (buffer: any, type: any) => any; | ||
fromHash: (hash: string, role: any) => string; | ||
toTypeInfo: (did: string, returnString?: boolean) => any; | ||
toAddress: typeof toAddress; | ||
toDid: typeof toDid; | ||
|
Oops, something went wrong.