@atomiqlabs/chain-starknet 4.0.0-dev.34 → 4.0.0-dev.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,6 +38,7 @@ export declare class StarknetChainInterface implements ChainInterface<StarknetTx
|
|
|
38
38
|
getNativeCurrencyAddress(): string;
|
|
39
39
|
isValidToken(tokenIdentifier: string): boolean;
|
|
40
40
|
isValidAddress(address: string, lenient?: boolean): boolean;
|
|
41
|
+
normalizeAddress(address: string): string;
|
|
41
42
|
offBeforeTxReplace(callback: (oldTx: string, oldTxId: string, newTx: string, newTxId: string) => Promise<void>): boolean;
|
|
42
43
|
onBeforeTxReplace(callback: (oldTx: string, oldTxId: string, newTx: string, newTxId: string) => Promise<void>): void;
|
|
43
44
|
onBeforeTxSigned(callback: (tx: StarknetTx) => Promise<void>): void;
|
|
@@ -49,6 +49,9 @@ class StarknetChainInterface {
|
|
|
49
49
|
isValidAddress(address, lenient) {
|
|
50
50
|
return StarknetAddresses_1.StarknetAddresses.isValidAddress(address, lenient);
|
|
51
51
|
}
|
|
52
|
+
normalizeAddress(address) {
|
|
53
|
+
return (0, Utils_1.toHex)(address);
|
|
54
|
+
}
|
|
52
55
|
///////////////////////////////////
|
|
53
56
|
//// Callbacks & handlers
|
|
54
57
|
offBeforeTxReplace(callback) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomiqlabs/chain-starknet",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.35",
|
|
4
4
|
"description": "Starknet specific base implementation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"url": "git+https://github.com/atomiqlabs/atomiq-chain-starknet.git"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atomiqlabs/base": "^10.0.0-dev.
|
|
31
|
+
"@atomiqlabs/base": "^10.0.0-dev.18",
|
|
32
32
|
"@noble/hashes": "^1.7.1",
|
|
33
33
|
"@scure/btc-signer": "^1.6.0",
|
|
34
34
|
"abi-wan-kanabi": "2.2.4",
|
|
@@ -92,6 +92,10 @@ export class StarknetChainInterface implements ChainInterface<StarknetTx, Starkn
|
|
|
92
92
|
return StarknetAddresses.isValidAddress(address, lenient);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
normalizeAddress(address: string): string {
|
|
96
|
+
return toHex(address);
|
|
97
|
+
}
|
|
98
|
+
|
|
95
99
|
///////////////////////////////////
|
|
96
100
|
//// Callbacks & handlers
|
|
97
101
|
offBeforeTxReplace(callback: (oldTx: string, oldTxId: string, newTx: string, newTxId: string) => Promise<void>): boolean {
|