@augustdigital/sdk 4.26.0-alpha.1 → 4.27.0
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.
- package/README.md +1 -1
- package/lib/abis/{SendersAllocationWhitelist.d.ts → OFT.d.ts} +46 -63
- package/lib/abis/OFT.js +65 -0
- package/lib/abis/OFT.js.map +1 -0
- package/lib/abis/index.d.ts +1 -0
- package/lib/abis/index.js +1 -0
- package/lib/abis/index.js.map +1 -1
- package/lib/evm/index.d.ts +2 -0
- package/lib/evm/index.js +19 -0
- package/lib/evm/index.js.map +1 -0
- package/lib/evm/methods/crossChainVault.d.ts +38 -0
- package/lib/evm/methods/crossChainVault.js +608 -0
- package/lib/evm/methods/crossChainVault.js.map +1 -0
- package/lib/evm/methods/index.d.ts +1 -0
- package/lib/evm/methods/index.js +18 -0
- package/lib/evm/methods/index.js.map +1 -0
- package/lib/evm/types/crossChain.d.ts +157 -0
- package/lib/{types/rwa-redemption.js → evm/types/crossChain.js} +1 -1
- package/lib/evm/types/crossChain.js.map +1 -0
- package/lib/evm/types/index.d.ts +1 -0
- package/lib/evm/types/index.js +18 -0
- package/lib/evm/types/index.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/modules/vaults/getters.js +1 -0
- package/lib/modules/vaults/getters.js.map +1 -1
- package/lib/modules/vaults/main.d.ts +1 -1
- package/lib/modules/vaults/main.js +4 -2
- package/lib/modules/vaults/main.js.map +1 -1
- package/lib/modules/vaults/write.actions.js +97 -26
- package/lib/modules/vaults/write.actions.js.map +1 -1
- package/lib/services/debank/fetcher.d.ts +108 -5
- package/lib/services/debank/fetcher.js.map +1 -1
- package/lib/services/debank/utils.js +51 -1
- package/lib/services/debank/utils.js.map +1 -1
- package/package.json +14 -14
- package/lib/abis/RwaRedeem.d.ts +0 -76
- package/lib/abis/RwaRedeem.js +0 -55
- package/lib/abis/RwaRedeem.js.map +0 -1
- package/lib/abis/SendersAllocationWhitelist.js +0 -157
- package/lib/abis/SendersAllocationWhitelist.js.map +0 -1
- package/lib/abis/TokenizedVaultV2Whitelist.d.ts +0 -454
- package/lib/abis/TokenizedVaultV2Whitelist.js +0 -327
- package/lib/abis/TokenizedVaultV2Whitelist.js.map +0 -1
- package/lib/core/analytics/version.d.ts +0 -1
- package/lib/core/analytics/version.js +0 -5
- package/lib/core/analytics/version.js.map +0 -1
- package/lib/core/constants/hardcoded-vaults.d.ts +0 -7
- package/lib/core/constants/hardcoded-vaults.js +0 -248
- package/lib/core/constants/hardcoded-vaults.js.map +0 -1
- package/lib/core/constants/rwa-vaults.d.ts +0 -4
- package/lib/core/constants/rwa-vaults.js +0 -28
- package/lib/core/constants/rwa-vaults.js.map +0 -1
- package/lib/core/helpers/address-utils.d.ts +0 -3
- package/lib/core/helpers/address-utils.js +0 -18
- package/lib/core/helpers/address-utils.js.map +0 -1
- package/lib/types/rwa-redemption.d.ts +0 -13
- package/lib/types/rwa-redemption.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ const sdk = new AugustSDK({
|
|
|
35
35
|
-1: 'https://api.mainnet-beta.solana.com', // Solana
|
|
36
36
|
},
|
|
37
37
|
keys: {
|
|
38
|
-
august: 'YOUR_API_KEY', // Optional
|
|
38
|
+
august: 'YOUR_API_KEY', // Optional: required for allocations, health factors, and subaccount operations
|
|
39
39
|
},
|
|
40
40
|
monitoring: {
|
|
41
41
|
env: 'DEV', // Optional: 'DEV' enables console logging (defaults to 'PROD')
|
|
@@ -1,40 +1,49 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
readonly type: "function";
|
|
3
|
-
readonly name: "getAllocationBps";
|
|
1
|
+
export declare const ABI_CROSS_CHAIN_ERC20: readonly [{
|
|
4
2
|
readonly inputs: readonly [{
|
|
5
|
-
readonly
|
|
3
|
+
readonly internalType: "address";
|
|
4
|
+
readonly name: "owner";
|
|
6
5
|
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
7
|
readonly internalType: "address";
|
|
8
|
+
readonly name: "spender";
|
|
9
|
+
readonly type: "address";
|
|
8
10
|
}];
|
|
11
|
+
readonly name: "allowance";
|
|
9
12
|
readonly outputs: readonly [{
|
|
13
|
+
readonly internalType: "uint256";
|
|
10
14
|
readonly name: "";
|
|
11
15
|
readonly type: "uint256";
|
|
12
|
-
readonly internalType: "uint256";
|
|
13
16
|
}];
|
|
14
17
|
readonly stateMutability: "view";
|
|
15
|
-
}, {
|
|
16
18
|
readonly type: "function";
|
|
17
|
-
|
|
19
|
+
}, {
|
|
18
20
|
readonly inputs: readonly [{
|
|
19
|
-
readonly name: "addr";
|
|
20
|
-
readonly type: "address";
|
|
21
21
|
readonly internalType: "address";
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly internalType: "uint256";
|
|
26
|
+
readonly name: "amount";
|
|
27
|
+
readonly type: "uint256";
|
|
22
28
|
}];
|
|
29
|
+
readonly name: "approve";
|
|
23
30
|
readonly outputs: readonly [{
|
|
31
|
+
readonly internalType: "bool";
|
|
24
32
|
readonly name: "";
|
|
25
|
-
readonly type: "
|
|
26
|
-
readonly internalType: "uint256";
|
|
33
|
+
readonly type: "bool";
|
|
27
34
|
}];
|
|
28
|
-
readonly stateMutability: "
|
|
29
|
-
}, {
|
|
35
|
+
readonly stateMutability: "nonpayable";
|
|
30
36
|
readonly type: "function";
|
|
31
|
-
|
|
37
|
+
}];
|
|
38
|
+
export declare const ABI_MULTI_ASSET_PREVIEW_DEPOSIT: readonly [{
|
|
39
|
+
readonly type: "function";
|
|
40
|
+
readonly name: "previewDeposit";
|
|
32
41
|
readonly inputs: readonly [{
|
|
33
|
-
readonly name: "
|
|
42
|
+
readonly name: "assetIn";
|
|
34
43
|
readonly type: "address";
|
|
35
44
|
readonly internalType: "address";
|
|
36
45
|
}, {
|
|
37
|
-
readonly name: "
|
|
46
|
+
readonly name: "amountIn";
|
|
38
47
|
readonly type: "uint256";
|
|
39
48
|
readonly internalType: "uint256";
|
|
40
49
|
}];
|
|
@@ -42,72 +51,46 @@ export declare const ABI_SENDERS_ALLOCATION_WHITELIST: readonly [{
|
|
|
42
51
|
readonly name: "";
|
|
43
52
|
readonly type: "uint256";
|
|
44
53
|
readonly internalType: "uint256";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "";
|
|
56
|
+
readonly type: "uint256";
|
|
57
|
+
readonly internalType: "uint256";
|
|
45
58
|
}];
|
|
46
59
|
readonly stateMutability: "view";
|
|
47
|
-
}
|
|
60
|
+
}];
|
|
61
|
+
export declare const ABI_MULTI_ASSET_PREVIEW_REDEEM: readonly [{
|
|
48
62
|
readonly type: "function";
|
|
49
|
-
readonly name: "
|
|
63
|
+
readonly name: "previewRedemption";
|
|
50
64
|
readonly inputs: readonly [{
|
|
51
|
-
readonly name: "
|
|
52
|
-
readonly type: "
|
|
53
|
-
readonly internalType: "
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
readonly name: "";
|
|
65
|
+
readonly name: "shares";
|
|
66
|
+
readonly type: "uint256";
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "isInstant";
|
|
57
70
|
readonly type: "bool";
|
|
58
71
|
readonly internalType: "bool";
|
|
59
72
|
}];
|
|
60
|
-
readonly stateMutability: "view";
|
|
61
|
-
}, {
|
|
62
|
-
readonly type: "function";
|
|
63
|
-
readonly name: "allocationBps";
|
|
64
|
-
readonly inputs: readonly [{
|
|
65
|
-
readonly name: "";
|
|
66
|
-
readonly type: "address";
|
|
67
|
-
readonly internalType: "address";
|
|
68
|
-
}];
|
|
69
73
|
readonly outputs: readonly [{
|
|
70
|
-
readonly name: "";
|
|
74
|
+
readonly name: "assetsAmount";
|
|
71
75
|
readonly type: "uint256";
|
|
72
76
|
readonly internalType: "uint256";
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}, {
|
|
76
|
-
readonly type: "function";
|
|
77
|
-
readonly name: "deposited";
|
|
78
|
-
readonly inputs: readonly [{
|
|
79
|
-
readonly name: "";
|
|
80
|
-
readonly type: "address";
|
|
81
|
-
readonly internalType: "address";
|
|
82
|
-
}];
|
|
83
|
-
readonly outputs: readonly [{
|
|
84
|
-
readonly name: "";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "assetsAfterFee";
|
|
85
79
|
readonly type: "uint256";
|
|
86
80
|
readonly internalType: "uint256";
|
|
87
81
|
}];
|
|
88
82
|
readonly stateMutability: "view";
|
|
89
|
-
}
|
|
83
|
+
}];
|
|
84
|
+
export declare const ABI_STANDARD_PREVIEW_REDEEM: readonly [{
|
|
90
85
|
readonly type: "function";
|
|
91
|
-
readonly name: "
|
|
86
|
+
readonly name: "previewRedeem";
|
|
92
87
|
readonly inputs: readonly [{
|
|
93
|
-
readonly name: "";
|
|
94
|
-
readonly type: "
|
|
95
|
-
readonly internalType: "address";
|
|
96
|
-
}];
|
|
97
|
-
readonly outputs: readonly [{
|
|
98
|
-
readonly name: "";
|
|
99
|
-
readonly type: "bool";
|
|
100
|
-
readonly internalType: "bool";
|
|
88
|
+
readonly name: "shares";
|
|
89
|
+
readonly type: "uint256";
|
|
101
90
|
}];
|
|
102
|
-
readonly stateMutability: "view";
|
|
103
|
-
}, {
|
|
104
|
-
readonly type: "function";
|
|
105
|
-
readonly name: "owner";
|
|
106
|
-
readonly inputs: readonly [];
|
|
107
91
|
readonly outputs: readonly [{
|
|
108
92
|
readonly name: "";
|
|
109
|
-
readonly type: "
|
|
110
|
-
readonly internalType: "address";
|
|
93
|
+
readonly type: "uint256";
|
|
111
94
|
}];
|
|
112
95
|
readonly stateMutability: "view";
|
|
113
96
|
}];
|
package/lib/abis/OFT.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ABI_STANDARD_PREVIEW_REDEEM = exports.ABI_MULTI_ASSET_PREVIEW_REDEEM = exports.ABI_MULTI_ASSET_PREVIEW_DEPOSIT = exports.ABI_CROSS_CHAIN_ERC20 = void 0;
|
|
4
|
+
exports.ABI_CROSS_CHAIN_ERC20 = [
|
|
5
|
+
{
|
|
6
|
+
inputs: [
|
|
7
|
+
{ internalType: 'address', name: 'owner', type: 'address' },
|
|
8
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
9
|
+
],
|
|
10
|
+
name: 'allowance',
|
|
11
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
12
|
+
stateMutability: 'view',
|
|
13
|
+
type: 'function',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
inputs: [
|
|
17
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
18
|
+
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
|
19
|
+
],
|
|
20
|
+
name: 'approve',
|
|
21
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
22
|
+
stateMutability: 'nonpayable',
|
|
23
|
+
type: 'function',
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
exports.ABI_MULTI_ASSET_PREVIEW_DEPOSIT = [
|
|
27
|
+
{
|
|
28
|
+
type: 'function',
|
|
29
|
+
name: 'previewDeposit',
|
|
30
|
+
inputs: [
|
|
31
|
+
{ name: 'assetIn', type: 'address', internalType: 'address' },
|
|
32
|
+
{ name: 'amountIn', type: 'uint256', internalType: 'uint256' },
|
|
33
|
+
],
|
|
34
|
+
outputs: [
|
|
35
|
+
{ name: '', type: 'uint256', internalType: 'uint256' },
|
|
36
|
+
{ name: '', type: 'uint256', internalType: 'uint256' },
|
|
37
|
+
],
|
|
38
|
+
stateMutability: 'view',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
exports.ABI_MULTI_ASSET_PREVIEW_REDEEM = [
|
|
42
|
+
{
|
|
43
|
+
type: 'function',
|
|
44
|
+
name: 'previewRedemption',
|
|
45
|
+
inputs: [
|
|
46
|
+
{ name: 'shares', type: 'uint256', internalType: 'uint256' },
|
|
47
|
+
{ name: 'isInstant', type: 'bool', internalType: 'bool' },
|
|
48
|
+
],
|
|
49
|
+
outputs: [
|
|
50
|
+
{ name: 'assetsAmount', type: 'uint256', internalType: 'uint256' },
|
|
51
|
+
{ name: 'assetsAfterFee', type: 'uint256', internalType: 'uint256' },
|
|
52
|
+
],
|
|
53
|
+
stateMutability: 'view',
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
exports.ABI_STANDARD_PREVIEW_REDEEM = [
|
|
57
|
+
{
|
|
58
|
+
type: 'function',
|
|
59
|
+
name: 'previewRedeem',
|
|
60
|
+
inputs: [{ name: 'shares', type: 'uint256' }],
|
|
61
|
+
outputs: [{ name: '', type: 'uint256' }],
|
|
62
|
+
stateMutability: 'view',
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
//# sourceMappingURL=OFT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OFT.js","sourceRoot":"","sources":["../../src.ts/abis/OFT.ts"],"names":[],"mappings":";;;AAQa,QAAA,qBAAqB,GAAG;IACnC;QACE,MAAM,EAAE;YACN,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;SAC9D;QACD,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7D;QACD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC3D,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;CACO,CAAC;AAOE,QAAA,+BAA+B,GAAG;IAC7C;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAC7D,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;SAC/D;QACD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YACtD,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;SACvD;QACD,eAAe,EAAE,MAAM;KACxB;CACO,CAAC;AAOE,QAAA,8BAA8B,GAAG;IAC5C;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAC5D,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;SAC1D;QACD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAClE,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;SACrE;QACD,eAAe,EAAE,MAAM;KACxB;CACO,CAAC;AAKE,QAAA,2BAA2B,GAAG;IACzC;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACxC,eAAe,EAAE,MAAM;KACxB;CACO,CAAC"}
|
package/lib/abis/index.d.ts
CHANGED
package/lib/abis/index.js
CHANGED
|
@@ -41,4 +41,5 @@ __exportStar(require("./TokenizedVaultV2WhitelistedAllocation"), exports);
|
|
|
41
41
|
__exportStar(require("./MultiAssetNativeDepositWrapper"), exports);
|
|
42
42
|
__exportStar(require("./TokenizedVaultV2SenderAllocationWhitelist"), exports);
|
|
43
43
|
__exportStar(require("./RwaRedeemSubaccount"), exports);
|
|
44
|
+
__exportStar(require("./OFT"), exports);
|
|
44
45
|
//# sourceMappingURL=index.js.map
|
package/lib/abis/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/abis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,gDAA8B;AAC9B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,oDAAkC;AAClC,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,6DAA2C;AAC3C,gEAA8C;AAC9C,gDAA8B;AAC9B,sDAAoC;AACpC,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC;AAChC,sEAAoD;AACpD,qDAAmC;AACnC,4DAA0C;AAC1C,sEAAoD;AACpD,0EAAwD;AACxD,mEAAiD;AACjD,8EAA4D;AAC5D,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/abis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,gDAA8B;AAC9B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,oDAAkC;AAClC,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,6DAA2C;AAC3C,gEAA8C;AAC9C,gDAA8B;AAC9B,sDAAoC;AACpC,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC;AAChC,sEAAoD;AACpD,qDAAmC;AACnC,4DAA0C;AAC1C,sEAAoD;AACpD,0EAAwD;AACxD,mEAAiD;AACjD,8EAA4D;AAC5D,wDAAsC;AACtC,wCAAsB"}
|
package/lib/evm/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./methods"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/evm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IAddress } from '../../types';
|
|
2
|
+
import type { ICrossChainVaultConfig, ICrossChainBuildRequest, ICrossChainBuildResult, ICrossChainDepositRequest, ICrossChainDepositResult, ICrossChainRedeemRequest, ICrossChainRedeemResult, IQuoteCrossChainDepositRequest, IQuoteCrossChainRedeemRequest, IQuoteCrossChainResult, CrossChainErrorType } from '../types/crossChain';
|
|
3
|
+
export declare function buildCrossChainVaultTx(props: ICrossChainBuildRequest): Promise<ICrossChainBuildResult>;
|
|
4
|
+
export declare function quoteCrossChainDeposit(props: IQuoteCrossChainDepositRequest): Promise<IQuoteCrossChainResult | null>;
|
|
5
|
+
export declare function quoteCrossChainRedeem(props: IQuoteCrossChainRedeemRequest): Promise<IQuoteCrossChainResult | null>;
|
|
6
|
+
export declare function needsCrossChainApproval(tokenAddress: IAddress, spenderAddress: IAddress, walletAddress: IAddress, amount: bigint, publicClient: {
|
|
7
|
+
readContract: (args: unknown) => Promise<unknown>;
|
|
8
|
+
}): Promise<boolean>;
|
|
9
|
+
export declare function approveCrossChain(tokenAddress: IAddress, spenderAddress: IAddress, amount: bigint, walletClient: {
|
|
10
|
+
account: {
|
|
11
|
+
address: string;
|
|
12
|
+
} | undefined;
|
|
13
|
+
writeContract: (args: unknown) => Promise<string>;
|
|
14
|
+
}, publicClient: {
|
|
15
|
+
waitForTransactionReceipt: (args: {
|
|
16
|
+
hash: string;
|
|
17
|
+
}) => Promise<{
|
|
18
|
+
status: string;
|
|
19
|
+
}>;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
export declare function crossChainVaultDeposit(props: ICrossChainDepositRequest): Promise<ICrossChainDepositResult>;
|
|
22
|
+
export declare function crossChainVaultRedeem(props: ICrossChainRedeemRequest): Promise<ICrossChainRedeemResult>;
|
|
23
|
+
export declare function isNoPeerError(errStr: string): boolean;
|
|
24
|
+
export declare function classifyCrossChainError(error: unknown): CrossChainErrorType;
|
|
25
|
+
export declare function canDepositFromChain(config: ICrossChainVaultConfig, userChainId: number): boolean;
|
|
26
|
+
export declare function canRedeemFromChain(config: ICrossChainVaultConfig, userChainId: number): boolean;
|
|
27
|
+
export declare function isCrossChainOperation(config: ICrossChainVaultConfig, userChainId: number, destinationChainId?: number): boolean;
|
|
28
|
+
export declare function getAvailableChains(config: ICrossChainVaultConfig): number[];
|
|
29
|
+
export declare function formatCrossChainError(errMsg: string): string;
|
|
30
|
+
export declare function getLayerZeroScanUrl(txHash: string, testnet?: boolean): string;
|
|
31
|
+
export declare const LAYERZERO_ENDPOINT_IDS: {
|
|
32
|
+
readonly ETHEREUM: 30101;
|
|
33
|
+
readonly ARBITRUM: 30110;
|
|
34
|
+
readonly AVALANCHE: 30106;
|
|
35
|
+
readonly BASE: 30184;
|
|
36
|
+
readonly SONIC: 30332;
|
|
37
|
+
readonly MONAD: 30390;
|
|
38
|
+
};
|