@1stdex/first-sdk 1.0.89 → 1.0.90-beta.2

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.
Files changed (40) hide show
  1. package/dist/cjs/calls/batch/index.js +2 -1
  2. package/dist/cjs/calls/batch/index.js.map +1 -1
  3. package/dist/cjs/calls/batch/prepare-claim-real-tokens.js +133 -1
  4. package/dist/cjs/calls/batch/prepare-claim-real-tokens.js.map +1 -1
  5. package/dist/cjs/calls/index.js +2 -1
  6. package/dist/cjs/calls/index.js.map +1 -1
  7. package/dist/cjs/constants/abis/core/erc20.js +33 -0
  8. package/dist/cjs/constants/abis/core/erc20.js.map +1 -0
  9. package/dist/cjs/constants/abis/core/layer-zero-sponsor.js +514 -0
  10. package/dist/cjs/constants/abis/core/layer-zero-sponsor.js.map +1 -0
  11. package/dist/cjs/constants/chain-configs/addresses.js +4 -0
  12. package/dist/cjs/constants/chain-configs/addresses.js.map +1 -1
  13. package/dist/esm/calls/batch/index.js +1 -1
  14. package/dist/esm/calls/batch/index.js.map +1 -1
  15. package/dist/esm/calls/batch/prepare-claim-real-tokens.js +178 -0
  16. package/dist/esm/calls/batch/prepare-claim-real-tokens.js.map +1 -1
  17. package/dist/esm/calls/index.js +1 -1
  18. package/dist/esm/calls/index.js.map +1 -1
  19. package/dist/esm/constants/abis/core/erc20.js +30 -0
  20. package/dist/esm/constants/abis/core/erc20.js.map +1 -0
  21. package/dist/esm/constants/abis/core/layer-zero-sponsor.js +511 -0
  22. package/dist/esm/constants/abis/core/layer-zero-sponsor.js.map +1 -0
  23. package/dist/esm/constants/chain-configs/addresses.js +4 -0
  24. package/dist/esm/constants/chain-configs/addresses.js.map +1 -1
  25. package/dist/tsconfig.build.tsbuildinfo +1 -1
  26. package/dist/types/calls/batch/index.d.ts +1 -1
  27. package/dist/types/calls/batch/index.d.ts.map +1 -1
  28. package/dist/types/calls/batch/prepare-claim-real-tokens.d.ts +41 -0
  29. package/dist/types/calls/batch/prepare-claim-real-tokens.d.ts.map +1 -1
  30. package/dist/types/calls/index.d.ts +1 -1
  31. package/dist/types/calls/index.d.ts.map +1 -1
  32. package/dist/types/constants/abis/core/erc20.d.ts +52 -0
  33. package/dist/types/constants/abis/core/erc20.d.ts.map +1 -0
  34. package/dist/types/constants/abis/core/layer-zero-sponsor.d.ts +399 -0
  35. package/dist/types/constants/abis/core/layer-zero-sponsor.d.ts.map +1 -0
  36. package/dist/types/constants/chain-configs/addresses.d.ts +1 -0
  37. package/dist/types/constants/chain-configs/addresses.d.ts.map +1 -1
  38. package/dist/types/views/address.d.ts +1 -0
  39. package/dist/types/views/address.d.ts.map +1 -1
  40. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  export { prepareLimitOrderWithSetup } from './prepare-limit-order-with-setup';
2
2
  export { prepareMarketOrderWithSetup } from './prepare-market-order-with-setup';
3
3
  export { prepareWithdraw, NotEnoughFundsError } from './prepare-withdraw';
4
- export { prepareClaimRealTokensSameChain, prepareClaimRealTokensCrossChainLZ, NotEnoughClaimableError, } from './prepare-claim-real-tokens';
4
+ export { prepareClaimRealTokensSameChain, prepareClaimRealTokensCrossChainLZ, prepareClaimRealTokensCrossChainBridgeLZ, NotEnoughClaimableError, } from './prepare-claim-real-tokens';
5
5
  export type { BatchCall } from './prepare-limit-order-with-setup';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calls/batch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calls/batch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,wCAAwC,EACxC,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"}
@@ -82,4 +82,45 @@ export declare const prepareClaimRealTokensCrossChainLZ: ({ chainId, destination
82
82
  amount: bigint;
83
83
  options?: DefaultWriteContractOptions;
84
84
  }) => Promise<BatchCall[]>;
85
+ /**
86
+ * Prepares transactions to claim real tokens and bridge them cross-chain via LayerZero using the sponsor contract.
87
+ * Claims the specified amount optimally (from mirror token and/or vault) to the user address,
88
+ * then bridges them to a receiving address on the destination chain using LayerZero's OFT protocol
89
+ * through the LayerZeroSponsor contract which pays the native fee.
90
+ * Throws NotEnoughClaimableError if combined claimable amount is insufficient.
91
+ *
92
+ * @param chainId The source chain ID.
93
+ * @param destinationChainId The destination chain ID.
94
+ * @param userAddress The user address.
95
+ * @param mirrorTokenAddress The mirror token address (OFT contract).
96
+ * @param receivingAddress The address to receive the tokens on destination chain.
97
+ * @param amount The amount to claim and send (in token base units, e.g., wei).
98
+ * @param options Optional parameters.
99
+ * @returns Promise resolving to array of batch calls.
100
+ * @example
101
+ * import { prepareClaimRealTokensCrossChainBridgeLZ } from '@1stdex/first-sdk'
102
+ * import { useSmartWallets } from '@privy-io/react-auth/smart-wallets'
103
+ *
104
+ * const calls = await prepareClaimRealTokensCrossChainBridgeLZ({
105
+ * chainId: 84532,
106
+ * destinationChainId: 8453,
107
+ * userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69',
108
+ * mirrorTokenAddress: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
109
+ * receivingAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
110
+ * amount: 1000000000000000000n // 1 token (18 decimals)
111
+ * })
112
+ *
113
+ * // Send all calls in one batched transaction
114
+ * const { client } = useSmartWallets()
115
+ * const txHash = await client.sendUserOperation({ calls })
116
+ */
117
+ export declare const prepareClaimRealTokensCrossChainBridgeLZ: ({ chainId, destinationChainId, userAddress, mirrorTokenAddress, receivingAddress, amount, options, }: {
118
+ chainId: CHAIN_IDS;
119
+ destinationChainId: CHAIN_IDS;
120
+ userAddress: `0x${string}`;
121
+ mirrorTokenAddress: `0x${string}`;
122
+ receivingAddress: `0x${string}`;
123
+ amount: bigint;
124
+ options?: DefaultWriteContractOptions;
125
+ }) => Promise<BatchCall[]>;
85
126
  //# sourceMappingURL=prepare-claim-real-tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-claim-real-tokens.d.ts","sourceRoot":"","sources":["../../../../src/calls/batch/prepare-claim-real-tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAC;AAM3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;aAG9B,QAAQ,EAAE,MAAM;aAChB,SAAS,EAAE,MAAM;gBAFjC,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;CAMpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,+BAA+B,6EAMzC;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,KAAG,QAAQ,SAAS,EAAE,CAkEtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,kCAAkC,yGAQ5C;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,KAAG,QAAQ,SAAS,EAAE,CA0KtB,CAAC"}
1
+ {"version":3,"file":"prepare-claim-real-tokens.d.ts","sourceRoot":"","sources":["../../../../src/calls/batch/prepare-claim-real-tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAC;AAQ3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;aAG9B,QAAQ,EAAE,MAAM;aAChB,SAAS,EAAE,MAAM;gBAFjC,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;CAMpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,+BAA+B,6EAMzC;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,KAAG,QAAQ,SAAS,EAAE,CAkEtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,kCAAkC,yGAQ5C;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,KAAG,QAAQ,SAAS,EAAE,CA0KtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,wCAAwC,yGAQlD;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,KAAG,QAAQ,SAAS,EAAE,CAsKtB,CAAC"}
@@ -8,6 +8,6 @@ export { setApprovalOfOpenOrdersForAll } from './approval/open-order';
8
8
  export { setTokenAllowances } from './approval/token';
9
9
  export { approveAllForMarket } from './approval/market';
10
10
  export { setVault, removeVault, depositToVault, withdrawFromVault, } from './vault';
11
- export { prepareLimitOrderWithSetup, prepareMarketOrderWithSetup, prepareWithdraw, NotEnoughFundsError, prepareClaimRealTokensSameChain, prepareClaimRealTokensCrossChainLZ, NotEnoughClaimableError, } from './batch';
11
+ export { prepareLimitOrderWithSetup, prepareMarketOrderWithSetup, prepareWithdraw, NotEnoughFundsError, prepareClaimRealTokensSameChain, prepareClaimRealTokensCrossChainLZ, prepareClaimRealTokensCrossChainBridgeLZ, NotEnoughClaimableError, } from './batch';
12
12
  export type { BatchCall } from './batch';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,mBAAmB,EACnB,+BAA+B,EAC/B,kCAAkC,EAClC,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,mBAAmB,EACnB,+BAA+B,EAC/B,kCAAkC,EAClC,wCAAwC,EACxC,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,52 @@
1
+ export declare const ERC20_ABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "address";
4
+ readonly name: "account";
5
+ readonly type: "address";
6
+ }];
7
+ readonly name: "balanceOf";
8
+ readonly outputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "";
11
+ readonly type: "uint256";
12
+ }];
13
+ readonly stateMutability: "view";
14
+ readonly type: "function";
15
+ }, {
16
+ readonly inputs: readonly [{
17
+ readonly internalType: "address";
18
+ readonly name: "owner";
19
+ readonly type: "address";
20
+ }, {
21
+ readonly internalType: "address";
22
+ readonly name: "spender";
23
+ readonly type: "address";
24
+ }];
25
+ readonly name: "allowance";
26
+ readonly outputs: readonly [{
27
+ readonly internalType: "uint256";
28
+ readonly name: "";
29
+ readonly type: "uint256";
30
+ }];
31
+ readonly stateMutability: "view";
32
+ readonly type: "function";
33
+ }, {
34
+ readonly inputs: readonly [{
35
+ readonly internalType: "address";
36
+ readonly name: "spender";
37
+ readonly type: "address";
38
+ }, {
39
+ readonly internalType: "uint256";
40
+ readonly name: "amount";
41
+ readonly type: "uint256";
42
+ }];
43
+ readonly name: "approve";
44
+ readonly outputs: readonly [{
45
+ readonly internalType: "bool";
46
+ readonly name: "";
47
+ readonly type: "bool";
48
+ }];
49
+ readonly stateMutability: "nonpayable";
50
+ readonly type: "function";
51
+ }];
52
+ //# sourceMappingURL=erc20.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erc20.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/erc20.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BZ,CAAC"}
@@ -0,0 +1,399 @@
1
+ export declare const LAYER_ZERO_SPONSOR_ABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "uint256";
4
+ readonly name: "_minBridgeAmount";
5
+ readonly type: "uint256";
6
+ }];
7
+ readonly stateMutability: "nonpayable";
8
+ readonly type: "constructor";
9
+ }, {
10
+ readonly inputs: readonly [];
11
+ readonly name: "BelowMinimumAmount";
12
+ readonly type: "error";
13
+ }, {
14
+ readonly inputs: readonly [];
15
+ readonly name: "InsufficientSponsorBalance";
16
+ readonly type: "error";
17
+ }, {
18
+ readonly inputs: readonly [];
19
+ readonly name: "InvalidAmount";
20
+ readonly type: "error";
21
+ }, {
22
+ readonly inputs: readonly [];
23
+ readonly name: "OFTNotWhitelisted";
24
+ readonly type: "error";
25
+ }, {
26
+ readonly inputs: readonly [{
27
+ readonly internalType: "address";
28
+ readonly name: "owner";
29
+ readonly type: "address";
30
+ }];
31
+ readonly name: "OwnableInvalidOwner";
32
+ readonly type: "error";
33
+ }, {
34
+ readonly inputs: readonly [{
35
+ readonly internalType: "address";
36
+ readonly name: "account";
37
+ readonly type: "address";
38
+ }];
39
+ readonly name: "OwnableUnauthorizedAccount";
40
+ readonly type: "error";
41
+ }, {
42
+ readonly inputs: readonly [];
43
+ readonly name: "ReentrancyGuardReentrantCall";
44
+ readonly type: "error";
45
+ }, {
46
+ readonly inputs: readonly [{
47
+ readonly internalType: "address";
48
+ readonly name: "token";
49
+ readonly type: "address";
50
+ }];
51
+ readonly name: "SafeERC20FailedOperation";
52
+ readonly type: "error";
53
+ }, {
54
+ readonly inputs: readonly [];
55
+ readonly name: "TransferFailed";
56
+ readonly type: "error";
57
+ }, {
58
+ readonly inputs: readonly [];
59
+ readonly name: "ZeroAddress";
60
+ readonly type: "error";
61
+ }, {
62
+ readonly anonymous: false;
63
+ readonly inputs: readonly [{
64
+ readonly indexed: true;
65
+ readonly internalType: "address";
66
+ readonly name: "user";
67
+ readonly type: "address";
68
+ }, {
69
+ readonly indexed: true;
70
+ readonly internalType: "address";
71
+ readonly name: "oftToken";
72
+ readonly type: "address";
73
+ }, {
74
+ readonly indexed: false;
75
+ readonly internalType: "uint32";
76
+ readonly name: "dstEid";
77
+ readonly type: "uint32";
78
+ }, {
79
+ readonly indexed: false;
80
+ readonly internalType: "uint256";
81
+ readonly name: "amount";
82
+ readonly type: "uint256";
83
+ }, {
84
+ readonly indexed: false;
85
+ readonly internalType: "uint256";
86
+ readonly name: "nativeFee";
87
+ readonly type: "uint256";
88
+ }, {
89
+ readonly indexed: false;
90
+ readonly internalType: "bytes32";
91
+ readonly name: "guid";
92
+ readonly type: "bytes32";
93
+ }];
94
+ readonly name: "BridgeSponsored";
95
+ readonly type: "event";
96
+ }, {
97
+ readonly anonymous: false;
98
+ readonly inputs: readonly [{
99
+ readonly indexed: true;
100
+ readonly internalType: "address";
101
+ readonly name: "from";
102
+ readonly type: "address";
103
+ }, {
104
+ readonly indexed: false;
105
+ readonly internalType: "uint256";
106
+ readonly name: "amount";
107
+ readonly type: "uint256";
108
+ }];
109
+ readonly name: "ETHDeposited";
110
+ readonly type: "event";
111
+ }, {
112
+ readonly anonymous: false;
113
+ readonly inputs: readonly [{
114
+ readonly indexed: true;
115
+ readonly internalType: "address";
116
+ readonly name: "to";
117
+ readonly type: "address";
118
+ }, {
119
+ readonly indexed: false;
120
+ readonly internalType: "uint256";
121
+ readonly name: "amount";
122
+ readonly type: "uint256";
123
+ }];
124
+ readonly name: "ETHWithdrawn";
125
+ readonly type: "event";
126
+ }, {
127
+ readonly anonymous: false;
128
+ readonly inputs: readonly [{
129
+ readonly indexed: false;
130
+ readonly internalType: "uint256";
131
+ readonly name: "oldAmount";
132
+ readonly type: "uint256";
133
+ }, {
134
+ readonly indexed: false;
135
+ readonly internalType: "uint256";
136
+ readonly name: "newAmount";
137
+ readonly type: "uint256";
138
+ }];
139
+ readonly name: "MinBridgeAmountUpdated";
140
+ readonly type: "event";
141
+ }, {
142
+ readonly anonymous: false;
143
+ readonly inputs: readonly [{
144
+ readonly indexed: true;
145
+ readonly internalType: "address";
146
+ readonly name: "oftToken";
147
+ readonly type: "address";
148
+ }, {
149
+ readonly indexed: false;
150
+ readonly internalType: "bool";
151
+ readonly name: "allowed";
152
+ readonly type: "bool";
153
+ }];
154
+ readonly name: "OFTWhitelisted";
155
+ readonly type: "event";
156
+ }, {
157
+ readonly anonymous: false;
158
+ readonly inputs: readonly [{
159
+ readonly indexed: true;
160
+ readonly internalType: "address";
161
+ readonly name: "previousOwner";
162
+ readonly type: "address";
163
+ }, {
164
+ readonly indexed: true;
165
+ readonly internalType: "address";
166
+ readonly name: "newOwner";
167
+ readonly type: "address";
168
+ }];
169
+ readonly name: "OwnershipTransferStarted";
170
+ readonly type: "event";
171
+ }, {
172
+ readonly anonymous: false;
173
+ readonly inputs: readonly [{
174
+ readonly indexed: true;
175
+ readonly internalType: "address";
176
+ readonly name: "previousOwner";
177
+ readonly type: "address";
178
+ }, {
179
+ readonly indexed: true;
180
+ readonly internalType: "address";
181
+ readonly name: "newOwner";
182
+ readonly type: "address";
183
+ }];
184
+ readonly name: "OwnershipTransferred";
185
+ readonly type: "event";
186
+ }, {
187
+ readonly anonymous: false;
188
+ readonly inputs: readonly [{
189
+ readonly indexed: true;
190
+ readonly internalType: "address";
191
+ readonly name: "token";
192
+ readonly type: "address";
193
+ }, {
194
+ readonly indexed: true;
195
+ readonly internalType: "address";
196
+ readonly name: "to";
197
+ readonly type: "address";
198
+ }, {
199
+ readonly indexed: false;
200
+ readonly internalType: "uint256";
201
+ readonly name: "amount";
202
+ readonly type: "uint256";
203
+ }];
204
+ readonly name: "TokensRecovered";
205
+ readonly type: "event";
206
+ }, {
207
+ readonly inputs: readonly [];
208
+ readonly name: "acceptOwnership";
209
+ readonly outputs: readonly [];
210
+ readonly stateMutability: "nonpayable";
211
+ readonly type: "function";
212
+ }, {
213
+ readonly inputs: readonly [];
214
+ readonly name: "deposit";
215
+ readonly outputs: readonly [];
216
+ readonly stateMutability: "payable";
217
+ readonly type: "function";
218
+ }, {
219
+ readonly inputs: readonly [];
220
+ readonly name: "getSponsorBalance";
221
+ readonly outputs: readonly [{
222
+ readonly internalType: "uint256";
223
+ readonly name: "";
224
+ readonly type: "uint256";
225
+ }];
226
+ readonly stateMutability: "view";
227
+ readonly type: "function";
228
+ }, {
229
+ readonly inputs: readonly [];
230
+ readonly name: "minBridgeAmount";
231
+ readonly outputs: readonly [{
232
+ readonly internalType: "uint256";
233
+ readonly name: "";
234
+ readonly type: "uint256";
235
+ }];
236
+ readonly stateMutability: "view";
237
+ readonly type: "function";
238
+ }, {
239
+ readonly inputs: readonly [];
240
+ readonly name: "owner";
241
+ readonly outputs: readonly [{
242
+ readonly internalType: "address";
243
+ readonly name: "";
244
+ readonly type: "address";
245
+ }];
246
+ readonly stateMutability: "view";
247
+ readonly type: "function";
248
+ }, {
249
+ readonly inputs: readonly [];
250
+ readonly name: "pendingOwner";
251
+ readonly outputs: readonly [{
252
+ readonly internalType: "address";
253
+ readonly name: "";
254
+ readonly type: "address";
255
+ }];
256
+ readonly stateMutability: "view";
257
+ readonly type: "function";
258
+ }, {
259
+ readonly inputs: readonly [];
260
+ readonly name: "renounceOwnership";
261
+ readonly outputs: readonly [];
262
+ readonly stateMutability: "nonpayable";
263
+ readonly type: "function";
264
+ }, {
265
+ readonly inputs: readonly [{
266
+ readonly internalType: "uint256";
267
+ readonly name: "_minAmount";
268
+ readonly type: "uint256";
269
+ }];
270
+ readonly name: "setMinBridgeAmount";
271
+ readonly outputs: readonly [];
272
+ readonly stateMutability: "nonpayable";
273
+ readonly type: "function";
274
+ }, {
275
+ readonly inputs: readonly [{
276
+ readonly internalType: "address";
277
+ readonly name: "oftToken";
278
+ readonly type: "address";
279
+ }, {
280
+ readonly internalType: "bool";
281
+ readonly name: "allowed";
282
+ readonly type: "bool";
283
+ }];
284
+ readonly name: "setOFTWhitelist";
285
+ readonly outputs: readonly [];
286
+ readonly stateMutability: "nonpayable";
287
+ readonly type: "function";
288
+ }, {
289
+ readonly inputs: readonly [{
290
+ readonly internalType: "address";
291
+ readonly name: "oftToken";
292
+ readonly type: "address";
293
+ }, {
294
+ readonly components: readonly [{
295
+ readonly internalType: "uint32";
296
+ readonly name: "dstEid";
297
+ readonly type: "uint32";
298
+ }, {
299
+ readonly internalType: "bytes32";
300
+ readonly name: "to";
301
+ readonly type: "bytes32";
302
+ }, {
303
+ readonly internalType: "uint256";
304
+ readonly name: "amountLD";
305
+ readonly type: "uint256";
306
+ }, {
307
+ readonly internalType: "uint256";
308
+ readonly name: "minAmountLD";
309
+ readonly type: "uint256";
310
+ }, {
311
+ readonly internalType: "bytes";
312
+ readonly name: "extraOptions";
313
+ readonly type: "bytes";
314
+ }, {
315
+ readonly internalType: "bytes";
316
+ readonly name: "composeMsg";
317
+ readonly type: "bytes";
318
+ }, {
319
+ readonly internalType: "bytes";
320
+ readonly name: "oftCmd";
321
+ readonly type: "bytes";
322
+ }];
323
+ readonly internalType: "struct IOFT.SendParam";
324
+ readonly name: "sendParam";
325
+ readonly type: "tuple";
326
+ }, {
327
+ readonly internalType: "address";
328
+ readonly name: "refundAddress";
329
+ readonly type: "address";
330
+ }];
331
+ readonly name: "sponsorBridge";
332
+ readonly outputs: readonly [{
333
+ readonly internalType: "bytes32";
334
+ readonly name: "guid";
335
+ readonly type: "bytes32";
336
+ }];
337
+ readonly stateMutability: "nonpayable";
338
+ readonly type: "function";
339
+ }, {
340
+ readonly inputs: readonly [{
341
+ readonly internalType: "address";
342
+ readonly name: "newOwner";
343
+ readonly type: "address";
344
+ }];
345
+ readonly name: "transferOwnership";
346
+ readonly outputs: readonly [];
347
+ readonly stateMutability: "nonpayable";
348
+ readonly type: "function";
349
+ }, {
350
+ readonly inputs: readonly [{
351
+ readonly internalType: "address";
352
+ readonly name: "";
353
+ readonly type: "address";
354
+ }];
355
+ readonly name: "whitelistedOFTs";
356
+ readonly outputs: readonly [{
357
+ readonly internalType: "bool";
358
+ readonly name: "";
359
+ readonly type: "bool";
360
+ }];
361
+ readonly stateMutability: "view";
362
+ readonly type: "function";
363
+ }, {
364
+ readonly inputs: readonly [{
365
+ readonly internalType: "address payable";
366
+ readonly name: "to";
367
+ readonly type: "address";
368
+ }, {
369
+ readonly internalType: "uint256";
370
+ readonly name: "amount";
371
+ readonly type: "uint256";
372
+ }];
373
+ readonly name: "withdrawETH";
374
+ readonly outputs: readonly [];
375
+ readonly stateMutability: "nonpayable";
376
+ readonly type: "function";
377
+ }, {
378
+ readonly inputs: readonly [{
379
+ readonly internalType: "address";
380
+ readonly name: "token";
381
+ readonly type: "address";
382
+ }, {
383
+ readonly internalType: "address";
384
+ readonly name: "to";
385
+ readonly type: "address";
386
+ }, {
387
+ readonly internalType: "uint256";
388
+ readonly name: "amount";
389
+ readonly type: "uint256";
390
+ }];
391
+ readonly name: "withdrawTokens";
392
+ readonly outputs: readonly [];
393
+ readonly stateMutability: "nonpayable";
394
+ readonly type: "function";
395
+ }, {
396
+ readonly stateMutability: "payable";
397
+ readonly type: "receive";
398
+ }];
399
+ //# sourceMappingURL=layer-zero-sponsor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-zero-sponsor.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/layer-zero-sponsor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6fzB,CAAC"}
@@ -4,6 +4,7 @@ export declare const CONTRACT_ADDRESSES: {
4
4
  Controller: `0x${string}`;
5
5
  BookManager: `0x${string}`;
6
6
  BookViewer: `0x${string}`;
7
+ LayerZeroSponsor: `0x${string}`;
7
8
  };
8
9
  };
9
10
  //# sourceMappingURL=addresses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QAC3B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;KAC3B;CAsBF,CAAC"}
1
+ {"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QAC3B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;KACjC;CA0BF,CAAC"}
@@ -17,5 +17,6 @@ export declare const getContractAddresses: ({ chainId }: {
17
17
  Controller: `0x${string}`;
18
18
  BookManager: `0x${string}`;
19
19
  BookViewer: `0x${string}`;
20
+ LayerZeroSponsor: `0x${string}`;
20
21
  };
21
22
  //# sourceMappingURL=address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/views/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,gBAAiB;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE;;;;CAEvE,CAAC"}
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/views/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,gBAAiB;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE;;;;;CAEvE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1stdex/first-sdk",
3
- "version": "1.0.89",
3
+ "version": "1.0.90-beta.2",
4
4
  "description": "🛠 An SDK for building applications on top of 1st V2",
5
5
  "files": [
6
6
  "dist"