@layerzerolabs/lz-aptos-sdk-v1 1.5.20 → 1.5.22
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/dist/index.d.ts +27 -26
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as aptos from 'aptos';
|
|
2
2
|
import { HexString } from 'aptos';
|
|
3
3
|
import { Environment, Stage } from '@layerzerolabs/lz-definitions';
|
|
4
|
+
import BN from 'bn.js';
|
|
4
5
|
|
|
5
6
|
interface ChannelType {
|
|
6
7
|
outbound_nonce: string;
|
|
@@ -11,7 +12,7 @@ interface ChannelType {
|
|
|
11
12
|
}
|
|
12
13
|
declare class Channel {
|
|
13
14
|
private sdk;
|
|
14
|
-
readonly module:
|
|
15
|
+
readonly module: string;
|
|
15
16
|
constructor(sdk: SDK);
|
|
16
17
|
getOutboundEvents(start: bigint, limit: number): Promise<aptos.Types.Event[]>;
|
|
17
18
|
getInboundEvents(start: bigint, limit: number): Promise<aptos.Types.Event[]>;
|
|
@@ -108,8 +109,8 @@ declare namespace index$2 {
|
|
|
108
109
|
|
|
109
110
|
declare class Endpoint {
|
|
110
111
|
private sdk;
|
|
111
|
-
readonly module:
|
|
112
|
-
readonly moduleName:
|
|
112
|
+
readonly module: string;
|
|
113
|
+
readonly moduleName: string;
|
|
113
114
|
constructor(sdk: SDK);
|
|
114
115
|
initialize(signer: aptos.AptosAccount, localChainId: aptos.BCS.Uint16): Promise<aptos.Types.Transaction>;
|
|
115
116
|
getUATypeInfo(uaAddress: aptos.MaybeHexString): Promise<TypeInfoEx>;
|
|
@@ -129,9 +130,9 @@ interface Fee {
|
|
|
129
130
|
}
|
|
130
131
|
declare class Executor {
|
|
131
132
|
private sdk;
|
|
132
|
-
readonly module:
|
|
133
|
-
readonly moduleName:
|
|
134
|
-
readonly type:
|
|
133
|
+
readonly module: string;
|
|
134
|
+
readonly moduleName: string;
|
|
135
|
+
readonly type: string;
|
|
135
136
|
constructor(sdk: SDK);
|
|
136
137
|
setDefaultAdapterParamsPayload(dstChainId: aptos.BCS.Uint16, adapterParams: aptos.BCS.Bytes): aptos.Types.EntryFunctionPayload;
|
|
137
138
|
setDefaultAdapterParams(signer: aptos.AptosAccount, dstChainId: aptos.BCS.Uint16, adapterParams: aptos.BCS.Bytes): Promise<aptos.Types.Transaction>;
|
|
@@ -170,7 +171,7 @@ declare class Executor {
|
|
|
170
171
|
|
|
171
172
|
declare class ExecutorConfig {
|
|
172
173
|
private sdk;
|
|
173
|
-
readonly module:
|
|
174
|
+
readonly module: string;
|
|
174
175
|
constructor(sdk: SDK);
|
|
175
176
|
getDefaultExecutor(remoteChainId: aptos.BCS.Uint16): Promise<[string, aptos.BCS.Uint64]>;
|
|
176
177
|
getExecutor(uaAddress: aptos.MaybeHexString, remoteChainId: aptos.BCS.Uint16, query?: {
|
|
@@ -181,8 +182,8 @@ declare class ExecutorConfig {
|
|
|
181
182
|
|
|
182
183
|
declare class MsgLibAuth {
|
|
183
184
|
private sdk;
|
|
184
|
-
readonly module:
|
|
185
|
-
readonly moduleName:
|
|
185
|
+
readonly module: string;
|
|
186
|
+
readonly moduleName: string;
|
|
186
187
|
constructor(sdk: SDK);
|
|
187
188
|
isAllowed(msglibReceive: string): Promise<boolean[]>;
|
|
188
189
|
denyPayload(msglibReceive: string): aptos.Types.EntryFunctionPayload;
|
|
@@ -192,9 +193,9 @@ declare class MsgLibAuth {
|
|
|
192
193
|
|
|
193
194
|
declare class MsgLibConfig {
|
|
194
195
|
private sdk;
|
|
195
|
-
readonly module:
|
|
196
|
-
readonly moduleName:
|
|
197
|
-
readonly semverModule:
|
|
196
|
+
readonly module: string;
|
|
197
|
+
readonly moduleName: string;
|
|
198
|
+
readonly semverModule: string;
|
|
198
199
|
constructor(sdk: SDK);
|
|
199
200
|
getDefaultSendMsgLib(remoteChainId: aptos.BCS.Uint16): Promise<{
|
|
200
201
|
major: aptos.BCS.Uint64;
|
|
@@ -210,13 +211,13 @@ declare class MsgLibConfig {
|
|
|
210
211
|
|
|
211
212
|
declare class MsgLibV1_0 {
|
|
212
213
|
private sdk;
|
|
213
|
-
readonly module:
|
|
214
|
+
readonly module: string;
|
|
214
215
|
constructor(sdk: SDK);
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
declare class PacketEvent {
|
|
218
219
|
private sdk;
|
|
219
|
-
readonly module:
|
|
220
|
+
readonly module: string;
|
|
220
221
|
constructor(sdk: SDK);
|
|
221
222
|
getInboundEvents(start: bigint, limit: number): Promise<aptos.Types.Event[]>;
|
|
222
223
|
getInboundEventCount(): Promise<number>;
|
|
@@ -230,8 +231,8 @@ declare class UlnConfig {
|
|
|
230
231
|
TYPE_RELAYER: number;
|
|
231
232
|
TYPE_INBOUND_CONFIRMATIONS: number;
|
|
232
233
|
TYPE_OUTBOUND_CONFIRMATIONS: number;
|
|
233
|
-
readonly module:
|
|
234
|
-
readonly moduleName:
|
|
234
|
+
readonly module: string;
|
|
235
|
+
readonly moduleName: string;
|
|
235
236
|
constructor(sdk: SDK);
|
|
236
237
|
setDefaultAppConfigPayload(remoteChainId: aptos.BCS.Uint16, config: UlnConfigType): aptos.Types.EntryFunctionPayload;
|
|
237
238
|
setDefaultAppConfig(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, config: UlnConfigType): Promise<aptos.Types.Transaction>;
|
|
@@ -319,7 +320,7 @@ declare function decodePayload(payload: Buffer): {
|
|
|
319
320
|
packetType: number;
|
|
320
321
|
remoteCoinAddr: Buffer;
|
|
321
322
|
receiverBytes: Buffer;
|
|
322
|
-
amount:
|
|
323
|
+
amount: BN;
|
|
323
324
|
};
|
|
324
325
|
declare function getSignedTransactionHash(signedTransaction: Uint8Array): string;
|
|
325
326
|
declare function getAddressFromPublicKey(publicKey: aptos.TxnBuilderTypes.Ed25519PublicKey): aptos.HexString;
|
|
@@ -430,7 +431,7 @@ declare namespace utils {
|
|
|
430
431
|
|
|
431
432
|
declare class UlnReceive {
|
|
432
433
|
private sdk;
|
|
433
|
-
readonly module:
|
|
434
|
+
readonly module: string;
|
|
434
435
|
constructor(sdk: SDK);
|
|
435
436
|
initialize(signer: aptos.AptosAccount): Promise<aptos.Types.Transaction>;
|
|
436
437
|
getOracleProposePayload(hash: Uint8Array, confirmations: aptos.BCS.Uint64 | aptos.BCS.Uint32): Promise<aptos.Types.EntryFunctionPayload>;
|
|
@@ -446,8 +447,8 @@ declare class UlnReceive {
|
|
|
446
447
|
|
|
447
448
|
declare class UlnSigner {
|
|
448
449
|
private sdk;
|
|
449
|
-
readonly module:
|
|
450
|
-
readonly moduleName:
|
|
450
|
+
readonly module: string;
|
|
451
|
+
readonly moduleName: string;
|
|
451
452
|
constructor(sdk: SDK);
|
|
452
453
|
register_TransactionPayload(): Promise<aptos.TxnBuilderTypes.TransactionPayload>;
|
|
453
454
|
registerMS(multisigAccountAddress: string, multisigAccountPubkey: aptos.TxnBuilderTypes.MultiEd25519PublicKey, signFunc: MultipleSignFunc): Promise<aptos.Types.Transaction>;
|
|
@@ -713,8 +714,8 @@ declare class Counter {
|
|
|
713
714
|
declare class MultisigOracle {
|
|
714
715
|
sdk: SDK;
|
|
715
716
|
readonly address: aptos.MaybeHexString;
|
|
716
|
-
readonly module:
|
|
717
|
-
readonly moduleName:
|
|
717
|
+
readonly module: string;
|
|
718
|
+
readonly moduleName: string;
|
|
718
719
|
constructor(sdk: SDK, address: aptos.MaybeHexString);
|
|
719
720
|
getProposePayload(hash: Uint8Array, confirmations: aptos.BCS.Uint64 | aptos.BCS.Uint32): aptos.Types.EntryFunctionPayload;
|
|
720
721
|
propose(signer: aptos.AptosAccount, hash: Uint8Array, confirmations: aptos.BCS.Uint64 | aptos.BCS.Uint32): Promise<aptos.Types.Transaction>;
|
|
@@ -765,8 +766,8 @@ declare class MultisigOracle {
|
|
|
765
766
|
declare class MultisigOracleTss {
|
|
766
767
|
sdk: SDK;
|
|
767
768
|
readonly address: aptos.MaybeHexString;
|
|
768
|
-
readonly module:
|
|
769
|
-
readonly moduleName:
|
|
769
|
+
readonly module: string;
|
|
770
|
+
readonly moduleName: string;
|
|
770
771
|
constructor(sdk: SDK, address: aptos.MaybeHexString);
|
|
771
772
|
getProposePayload(hash: Uint8Array, confirmations: aptos.BCS.Uint64 | aptos.BCS.Uint32, expiration: aptos.BCS.Uint64 | aptos.BCS.Uint32, signatures: Uint8Array): aptos.Types.EntryFunctionPayload;
|
|
772
773
|
propose(signer: aptos.AptosAccount, hash: Uint8Array, confirmations: aptos.BCS.Uint64 | aptos.BCS.Uint32, expiration: aptos.BCS.Uint64 | aptos.BCS.Uint32, signatures: Uint8Array): Promise<aptos.Types.Transaction>;
|
|
@@ -877,8 +878,8 @@ declare class OFT {
|
|
|
877
878
|
declare class Oracle {
|
|
878
879
|
sdk: SDK;
|
|
879
880
|
readonly address: aptos.MaybeHexString;
|
|
880
|
-
readonly module:
|
|
881
|
-
readonly moduleName:
|
|
881
|
+
readonly module: string;
|
|
882
|
+
readonly moduleName: string;
|
|
882
883
|
constructor(sdk: SDK, address: aptos.MaybeHexString);
|
|
883
884
|
getThreshold(): Promise<aptos.BCS.Uint8>;
|
|
884
885
|
setThresholdPayload(threshold: aptos.BCS.Uint8): aptos.Types.EntryFunctionPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/lz-aptos-sdk-v1",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.22",
|
|
4
4
|
"description": "Aptos SDK for LayerZero",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aptos",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "$npm_execpath jest --runInBand ./**/*.test.ts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@layerzerolabs/lz-definitions": "^1.5.
|
|
30
|
+
"@layerzerolabs/lz-definitions": "^1.5.22",
|
|
31
31
|
"@noble/hashes": "^1.1.5",
|
|
32
32
|
"aptos": "^1.5.0",
|
|
33
33
|
"bip39": "^3.0.4",
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
"@babel/core": "^7.20.12",
|
|
40
40
|
"@babel/preset-env": "^7.20.2",
|
|
41
41
|
"@babel/preset-typescript": "^7.18.6",
|
|
42
|
-
"@layerzerolabs-internal/tsup-config": "^1.5.
|
|
43
|
-
"@layerzerolabs-internal/typescript-config": "^1.5.
|
|
44
|
-
"@layerzerolabs/app-bridge-v1": "^1.5.
|
|
42
|
+
"@layerzerolabs-internal/tsup-config": "^1.5.22",
|
|
43
|
+
"@layerzerolabs-internal/typescript-config": "^1.5.22",
|
|
44
|
+
"@layerzerolabs/app-bridge-v1": "^1.5.22",
|
|
45
|
+
"@types/bn.js": "^5.1.1",
|
|
45
46
|
"@types/jest": "^29.2.5",
|
|
46
47
|
"@types/node": "^20.2.5",
|
|
47
48
|
"babel-jest": "^29.3.1",
|