@thalalabs/surf 1.8.0 → 1.9.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/CHANGELOG.md +12 -0
- package/build/cjs/abi/initia_account.js +232 -0
- package/build/cjs/abi/initia_account.js.map +1 -0
- package/build/cjs/abi/initia_coin.js +369 -0
- package/build/cjs/abi/initia_coin.js.map +1 -0
- package/build/cjs/core/Client.js +111 -33
- package/build/cjs/core/Client.js.map +1 -1
- package/build/cjs/core/WalletClient.js +4 -3
- package/build/cjs/core/WalletClient.js.map +1 -1
- package/build/cjs/core/createEntryPayload.js +3 -1
- package/build/cjs/core/createEntryPayload.js.map +1 -1
- package/build/cjs/hooks/useSubmitTransaction.js +47 -23
- package/build/cjs/hooks/useSubmitTransaction.js.map +1 -1
- package/build/cjs/utils/bcs.js +97 -0
- package/build/cjs/utils/bcs.js.map +1 -0
- package/build/esm/abi/initia_account.js +229 -0
- package/build/esm/abi/initia_account.js.map +1 -0
- package/build/esm/abi/initia_coin.js +366 -0
- package/build/esm/abi/initia_coin.js.map +1 -0
- package/build/esm/core/Client.js +111 -33
- package/build/esm/core/Client.js.map +1 -1
- package/build/esm/core/WalletClient.js +4 -3
- package/build/esm/core/WalletClient.js.map +1 -1
- package/build/esm/core/createEntryPayload.js +3 -1
- package/build/esm/core/createEntryPayload.js.map +1 -1
- package/build/esm/hooks/useSubmitTransaction.js +47 -23
- package/build/esm/hooks/useSubmitTransaction.js.map +1 -1
- package/build/esm/utils/bcs.js +93 -0
- package/build/esm/utils/bcs.js.map +1 -0
- package/build/types/abi/initia_account.d.ts +210 -0
- package/build/types/abi/initia_account.d.ts.map +1 -0
- package/build/types/abi/initia_coin.d.ts +287 -0
- package/build/types/abi/initia_coin.d.ts.map +1 -0
- package/build/types/core/Client.d.ts +5 -3
- package/build/types/core/Client.d.ts.map +1 -1
- package/build/types/core/WalletClient.d.ts.map +1 -1
- package/build/types/core/createEntryPayload.d.ts.map +1 -1
- package/build/types/hooks/useSubmitTransaction.d.ts.map +1 -1
- package/build/types/types/client/client.d.ts +2 -1
- package/build/types/types/client/client.d.ts.map +1 -1
- package/build/types/utils/bcs.d.ts +9 -0
- package/build/types/utils/bcs.d.ts.map +1 -0
- package/package.json +11 -3
- package/src/abi/initia_account.ts +228 -0
- package/src/abi/initia_coin.ts +365 -0
- package/src/core/Client.ts +135 -46
- package/src/core/WalletClient.ts +6 -9
- package/src/core/__tests__/createEntryPayload.test.ts +15 -0
- package/src/core/createEntryPayload.ts +3 -1
- package/src/hooks/useSubmitTransaction.ts +47 -15
- package/src/types/client/client.ts +16 -5
- package/src/utils/bcs.ts +104 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export declare const INITIA_ACCOUNT_ABI: {
|
|
2
|
+
readonly address: "0x1";
|
|
3
|
+
readonly name: "account";
|
|
4
|
+
readonly friends: readonly ["0x1::table", "0x1::object"];
|
|
5
|
+
readonly exposed_functions: readonly [{
|
|
6
|
+
readonly name: "account_info";
|
|
7
|
+
readonly visibility: "public";
|
|
8
|
+
readonly is_entry: false;
|
|
9
|
+
readonly is_view: false;
|
|
10
|
+
readonly generic_type_params: readonly [];
|
|
11
|
+
readonly params: readonly ["address"];
|
|
12
|
+
readonly return: readonly ["bool", "u64", "u64", "u8", "bool"];
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "create_account";
|
|
15
|
+
readonly visibility: "public";
|
|
16
|
+
readonly is_entry: false;
|
|
17
|
+
readonly is_view: false;
|
|
18
|
+
readonly generic_type_params: readonly [];
|
|
19
|
+
readonly params: readonly ["address"];
|
|
20
|
+
readonly return: readonly ["u64"];
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "create_account_script";
|
|
23
|
+
readonly visibility: "public";
|
|
24
|
+
readonly is_entry: true;
|
|
25
|
+
readonly is_view: false;
|
|
26
|
+
readonly generic_type_params: readonly [];
|
|
27
|
+
readonly params: readonly ["address"];
|
|
28
|
+
readonly return: readonly [];
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "create_address";
|
|
31
|
+
readonly visibility: "friend";
|
|
32
|
+
readonly is_entry: false;
|
|
33
|
+
readonly is_view: false;
|
|
34
|
+
readonly generic_type_params: readonly [];
|
|
35
|
+
readonly params: readonly ["vector<u8>"];
|
|
36
|
+
readonly return: readonly ["address"];
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "create_object_account";
|
|
39
|
+
readonly visibility: "friend";
|
|
40
|
+
readonly is_entry: false;
|
|
41
|
+
readonly is_view: false;
|
|
42
|
+
readonly generic_type_params: readonly [];
|
|
43
|
+
readonly params: readonly ["address"];
|
|
44
|
+
readonly return: readonly ["u64"];
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "create_signer";
|
|
47
|
+
readonly visibility: "friend";
|
|
48
|
+
readonly is_entry: false;
|
|
49
|
+
readonly is_view: false;
|
|
50
|
+
readonly generic_type_params: readonly [];
|
|
51
|
+
readonly params: readonly ["address"];
|
|
52
|
+
readonly return: readonly ["signer"];
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "create_table_account";
|
|
55
|
+
readonly visibility: "friend";
|
|
56
|
+
readonly is_entry: false;
|
|
57
|
+
readonly is_view: false;
|
|
58
|
+
readonly generic_type_params: readonly [];
|
|
59
|
+
readonly params: readonly ["address"];
|
|
60
|
+
readonly return: readonly ["u64"];
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "exists_at";
|
|
63
|
+
readonly visibility: "public";
|
|
64
|
+
readonly is_entry: false;
|
|
65
|
+
readonly is_view: true;
|
|
66
|
+
readonly generic_type_params: readonly [];
|
|
67
|
+
readonly params: readonly ["address"];
|
|
68
|
+
readonly return: readonly ["bool"];
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "get_account_info";
|
|
71
|
+
readonly visibility: "public";
|
|
72
|
+
readonly is_entry: false;
|
|
73
|
+
readonly is_view: true;
|
|
74
|
+
readonly generic_type_params: readonly [];
|
|
75
|
+
readonly params: readonly ["address"];
|
|
76
|
+
readonly return: readonly ["bool", "0x1::account::AccountInfo"];
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "get_account_number";
|
|
79
|
+
readonly visibility: "public";
|
|
80
|
+
readonly is_entry: false;
|
|
81
|
+
readonly is_view: true;
|
|
82
|
+
readonly generic_type_params: readonly [];
|
|
83
|
+
readonly params: readonly ["address"];
|
|
84
|
+
readonly return: readonly ["u64"];
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "get_account_number_with_info";
|
|
87
|
+
readonly visibility: "public";
|
|
88
|
+
readonly is_entry: false;
|
|
89
|
+
readonly is_view: false;
|
|
90
|
+
readonly generic_type_params: readonly [];
|
|
91
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
92
|
+
readonly return: readonly ["u64"];
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "get_sequence_number";
|
|
95
|
+
readonly visibility: "public";
|
|
96
|
+
readonly is_entry: false;
|
|
97
|
+
readonly is_view: true;
|
|
98
|
+
readonly generic_type_params: readonly [];
|
|
99
|
+
readonly params: readonly ["address"];
|
|
100
|
+
readonly return: readonly ["u64"];
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "get_sequence_number_with_info";
|
|
103
|
+
readonly visibility: "public";
|
|
104
|
+
readonly is_entry: false;
|
|
105
|
+
readonly is_view: false;
|
|
106
|
+
readonly generic_type_params: readonly [];
|
|
107
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
108
|
+
readonly return: readonly ["u64"];
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "is_base_account";
|
|
111
|
+
readonly visibility: "public";
|
|
112
|
+
readonly is_entry: false;
|
|
113
|
+
readonly is_view: true;
|
|
114
|
+
readonly generic_type_params: readonly [];
|
|
115
|
+
readonly params: readonly ["address"];
|
|
116
|
+
readonly return: readonly ["bool"];
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "is_base_account_with_info";
|
|
119
|
+
readonly visibility: "public";
|
|
120
|
+
readonly is_entry: false;
|
|
121
|
+
readonly is_view: false;
|
|
122
|
+
readonly generic_type_params: readonly [];
|
|
123
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
124
|
+
readonly return: readonly ["bool"];
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "is_blocked";
|
|
127
|
+
readonly visibility: "public";
|
|
128
|
+
readonly is_entry: false;
|
|
129
|
+
readonly is_view: true;
|
|
130
|
+
readonly generic_type_params: readonly [];
|
|
131
|
+
readonly params: readonly ["address"];
|
|
132
|
+
readonly return: readonly ["bool"];
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "is_blocked_with_info";
|
|
135
|
+
readonly visibility: "public";
|
|
136
|
+
readonly is_entry: false;
|
|
137
|
+
readonly is_view: false;
|
|
138
|
+
readonly generic_type_params: readonly [];
|
|
139
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
140
|
+
readonly return: readonly ["bool"];
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "is_module_account";
|
|
143
|
+
readonly visibility: "public";
|
|
144
|
+
readonly is_entry: false;
|
|
145
|
+
readonly is_view: true;
|
|
146
|
+
readonly generic_type_params: readonly [];
|
|
147
|
+
readonly params: readonly ["address"];
|
|
148
|
+
readonly return: readonly ["bool"];
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "is_module_account_with_info";
|
|
151
|
+
readonly visibility: "public";
|
|
152
|
+
readonly is_entry: false;
|
|
153
|
+
readonly is_view: false;
|
|
154
|
+
readonly generic_type_params: readonly [];
|
|
155
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
156
|
+
readonly return: readonly ["bool"];
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "is_object_account";
|
|
159
|
+
readonly visibility: "public";
|
|
160
|
+
readonly is_entry: false;
|
|
161
|
+
readonly is_view: true;
|
|
162
|
+
readonly generic_type_params: readonly [];
|
|
163
|
+
readonly params: readonly ["address"];
|
|
164
|
+
readonly return: readonly ["bool"];
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "is_object_account_with_info";
|
|
167
|
+
readonly visibility: "public";
|
|
168
|
+
readonly is_entry: false;
|
|
169
|
+
readonly is_view: false;
|
|
170
|
+
readonly generic_type_params: readonly [];
|
|
171
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
172
|
+
readonly return: readonly ["bool"];
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "is_table_account";
|
|
175
|
+
readonly visibility: "public";
|
|
176
|
+
readonly is_entry: false;
|
|
177
|
+
readonly is_view: true;
|
|
178
|
+
readonly generic_type_params: readonly [];
|
|
179
|
+
readonly params: readonly ["address"];
|
|
180
|
+
readonly return: readonly ["bool"];
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "is_table_account_with_info";
|
|
183
|
+
readonly visibility: "public";
|
|
184
|
+
readonly is_entry: false;
|
|
185
|
+
readonly is_view: false;
|
|
186
|
+
readonly generic_type_params: readonly [];
|
|
187
|
+
readonly params: readonly ["&0x1::account::AccountInfo"];
|
|
188
|
+
readonly return: readonly ["bool"];
|
|
189
|
+
}];
|
|
190
|
+
readonly structs: readonly [{
|
|
191
|
+
readonly name: "AccountInfo";
|
|
192
|
+
readonly is_native: false;
|
|
193
|
+
readonly abilities: readonly ["copy", "drop"];
|
|
194
|
+
readonly generic_type_params: readonly [];
|
|
195
|
+
readonly fields: readonly [{
|
|
196
|
+
readonly name: "account_number";
|
|
197
|
+
readonly type: "u64";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "sequence_number";
|
|
200
|
+
readonly type: "u64";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "account_type";
|
|
203
|
+
readonly type: "u8";
|
|
204
|
+
}, {
|
|
205
|
+
readonly name: "is_blocked";
|
|
206
|
+
readonly type: "bool";
|
|
207
|
+
}];
|
|
208
|
+
}];
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=initia_account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initia_account.d.ts","sourceRoot":"","sources":["../../../src/abi/initia_account.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmOrB,CAAC"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
export declare const INITIA_COIN_ABI: {
|
|
2
|
+
readonly address: "0x1";
|
|
3
|
+
readonly name: "coin";
|
|
4
|
+
readonly friends: readonly ["0x1::managed_coin", "0x1::staking"];
|
|
5
|
+
readonly exposed_functions: readonly [{
|
|
6
|
+
readonly name: "name";
|
|
7
|
+
readonly visibility: "public";
|
|
8
|
+
readonly is_entry: false;
|
|
9
|
+
readonly is_view: true;
|
|
10
|
+
readonly generic_type_params: readonly [];
|
|
11
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
12
|
+
readonly return: readonly ["0x1::string::String"];
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "transfer";
|
|
15
|
+
readonly visibility: "public";
|
|
16
|
+
readonly is_entry: true;
|
|
17
|
+
readonly is_view: false;
|
|
18
|
+
readonly generic_type_params: readonly [];
|
|
19
|
+
readonly params: readonly ["&signer", "address", "0x1::object::Object<0x1::fungible_asset::Metadata>", "u64"];
|
|
20
|
+
readonly return: readonly [];
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "metadata";
|
|
23
|
+
readonly visibility: "public";
|
|
24
|
+
readonly is_entry: false;
|
|
25
|
+
readonly is_view: true;
|
|
26
|
+
readonly generic_type_params: readonly [];
|
|
27
|
+
readonly params: readonly ["address", "0x1::string::String"];
|
|
28
|
+
readonly return: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "symbol";
|
|
31
|
+
readonly visibility: "public";
|
|
32
|
+
readonly is_entry: false;
|
|
33
|
+
readonly is_view: true;
|
|
34
|
+
readonly generic_type_params: readonly [];
|
|
35
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
36
|
+
readonly return: readonly ["0x1::string::String"];
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "decimals";
|
|
39
|
+
readonly visibility: "public";
|
|
40
|
+
readonly is_entry: false;
|
|
41
|
+
readonly is_view: true;
|
|
42
|
+
readonly generic_type_params: readonly [];
|
|
43
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
44
|
+
readonly return: readonly ["u8"];
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "balance";
|
|
47
|
+
readonly visibility: "public";
|
|
48
|
+
readonly is_entry: false;
|
|
49
|
+
readonly is_view: true;
|
|
50
|
+
readonly generic_type_params: readonly [];
|
|
51
|
+
readonly params: readonly ["address", "0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
52
|
+
readonly return: readonly ["u64"];
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "burn";
|
|
55
|
+
readonly visibility: "public";
|
|
56
|
+
readonly is_entry: false;
|
|
57
|
+
readonly is_view: false;
|
|
58
|
+
readonly generic_type_params: readonly [];
|
|
59
|
+
readonly params: readonly ["&0x1::coin::BurnCapability", "0x1::fungible_asset::FungibleAsset"];
|
|
60
|
+
readonly return: readonly [];
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "deposit";
|
|
63
|
+
readonly visibility: "public";
|
|
64
|
+
readonly is_entry: false;
|
|
65
|
+
readonly is_view: false;
|
|
66
|
+
readonly generic_type_params: readonly [];
|
|
67
|
+
readonly params: readonly ["address", "0x1::fungible_asset::FungibleAsset"];
|
|
68
|
+
readonly return: readonly [];
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "is_frozen";
|
|
71
|
+
readonly visibility: "public";
|
|
72
|
+
readonly is_entry: false;
|
|
73
|
+
readonly is_view: true;
|
|
74
|
+
readonly generic_type_params: readonly [];
|
|
75
|
+
readonly params: readonly ["address", "0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
76
|
+
readonly return: readonly ["bool"];
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "maximum";
|
|
79
|
+
readonly visibility: "public";
|
|
80
|
+
readonly is_entry: false;
|
|
81
|
+
readonly is_view: true;
|
|
82
|
+
readonly generic_type_params: readonly [];
|
|
83
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
84
|
+
readonly return: readonly ["0x1::option::Option<u128>"];
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "mint";
|
|
87
|
+
readonly visibility: "public";
|
|
88
|
+
readonly is_entry: false;
|
|
89
|
+
readonly is_view: false;
|
|
90
|
+
readonly generic_type_params: readonly [];
|
|
91
|
+
readonly params: readonly ["&0x1::coin::MintCapability", "u64"];
|
|
92
|
+
readonly return: readonly ["0x1::fungible_asset::FungibleAsset"];
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "mint_to";
|
|
95
|
+
readonly visibility: "public";
|
|
96
|
+
readonly is_entry: false;
|
|
97
|
+
readonly is_view: false;
|
|
98
|
+
readonly generic_type_params: readonly [];
|
|
99
|
+
readonly params: readonly ["&0x1::coin::MintCapability", "address", "u64"];
|
|
100
|
+
readonly return: readonly [];
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "sudo_deposit";
|
|
103
|
+
readonly visibility: "friend";
|
|
104
|
+
readonly is_entry: false;
|
|
105
|
+
readonly is_view: false;
|
|
106
|
+
readonly generic_type_params: readonly [];
|
|
107
|
+
readonly params: readonly ["address", "0x1::fungible_asset::FungibleAsset"];
|
|
108
|
+
readonly return: readonly [];
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "sudo_transfer";
|
|
111
|
+
readonly visibility: "public";
|
|
112
|
+
readonly is_entry: true;
|
|
113
|
+
readonly is_view: false;
|
|
114
|
+
readonly generic_type_params: readonly [];
|
|
115
|
+
readonly params: readonly ["&signer", "&signer", "address", "0x1::object::Object<0x1::fungible_asset::Metadata>", "u64"];
|
|
116
|
+
readonly return: readonly [];
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "supply";
|
|
119
|
+
readonly visibility: "public";
|
|
120
|
+
readonly is_entry: false;
|
|
121
|
+
readonly is_view: true;
|
|
122
|
+
readonly generic_type_params: readonly [];
|
|
123
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
124
|
+
readonly return: readonly ["0x1::option::Option<u128>"];
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "withdraw";
|
|
127
|
+
readonly visibility: "public";
|
|
128
|
+
readonly is_entry: false;
|
|
129
|
+
readonly is_view: false;
|
|
130
|
+
readonly generic_type_params: readonly [];
|
|
131
|
+
readonly params: readonly ["&signer", "0x1::object::Object<0x1::fungible_asset::Metadata>", "u64"];
|
|
132
|
+
readonly return: readonly ["0x1::fungible_asset::FungibleAsset"];
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "metadata_address";
|
|
135
|
+
readonly visibility: "public";
|
|
136
|
+
readonly is_entry: false;
|
|
137
|
+
readonly is_view: true;
|
|
138
|
+
readonly generic_type_params: readonly [];
|
|
139
|
+
readonly params: readonly ["address", "0x1::string::String"];
|
|
140
|
+
readonly return: readonly ["address"];
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "balances";
|
|
143
|
+
readonly visibility: "public";
|
|
144
|
+
readonly is_entry: false;
|
|
145
|
+
readonly is_view: true;
|
|
146
|
+
readonly generic_type_params: readonly [];
|
|
147
|
+
readonly params: readonly ["address", "0x1::option::Option<address>", "u8"];
|
|
148
|
+
readonly return: readonly ["vector<0x1::object::Object<0x1::fungible_asset::Metadata>>", "vector<u64>"];
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "denom_to_metadata";
|
|
151
|
+
readonly visibility: "public";
|
|
152
|
+
readonly is_entry: false;
|
|
153
|
+
readonly is_view: true;
|
|
154
|
+
readonly generic_type_params: readonly [];
|
|
155
|
+
readonly params: readonly ["0x1::string::String"];
|
|
156
|
+
readonly return: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "freeze_coin_store";
|
|
159
|
+
readonly visibility: "public";
|
|
160
|
+
readonly is_entry: false;
|
|
161
|
+
readonly is_view: false;
|
|
162
|
+
readonly generic_type_params: readonly [];
|
|
163
|
+
readonly params: readonly ["&0x1::coin::FreezeCapability", "address"];
|
|
164
|
+
readonly return: readonly [];
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "initialize";
|
|
167
|
+
readonly visibility: "public";
|
|
168
|
+
readonly is_entry: false;
|
|
169
|
+
readonly is_view: false;
|
|
170
|
+
readonly generic_type_params: readonly [];
|
|
171
|
+
readonly params: readonly ["&signer", "0x1::option::Option<u128>", "0x1::string::String", "0x1::string::String", "u8", "0x1::string::String", "0x1::string::String"];
|
|
172
|
+
readonly return: readonly ["0x1::coin::MintCapability", "0x1::coin::BurnCapability", "0x1::coin::FreezeCapability"];
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "initialize_and_generate_extend_ref";
|
|
175
|
+
readonly visibility: "public";
|
|
176
|
+
readonly is_entry: false;
|
|
177
|
+
readonly is_view: false;
|
|
178
|
+
readonly generic_type_params: readonly [];
|
|
179
|
+
readonly params: readonly ["&signer", "0x1::option::Option<u128>", "0x1::string::String", "0x1::string::String", "u8", "0x1::string::String", "0x1::string::String"];
|
|
180
|
+
readonly return: readonly ["0x1::coin::MintCapability", "0x1::coin::BurnCapability", "0x1::coin::FreezeCapability", "0x1::object::ExtendRef"];
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "is_coin";
|
|
183
|
+
readonly visibility: "public";
|
|
184
|
+
readonly is_entry: false;
|
|
185
|
+
readonly is_view: true;
|
|
186
|
+
readonly generic_type_params: readonly [];
|
|
187
|
+
readonly params: readonly ["address"];
|
|
188
|
+
readonly return: readonly ["bool"];
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "is_coin_by_symbol";
|
|
191
|
+
readonly visibility: "public";
|
|
192
|
+
readonly is_entry: false;
|
|
193
|
+
readonly is_view: true;
|
|
194
|
+
readonly generic_type_params: readonly [];
|
|
195
|
+
readonly params: readonly ["address", "0x1::string::String"];
|
|
196
|
+
readonly return: readonly ["bool"];
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "metadata_to_denom";
|
|
199
|
+
readonly visibility: "public";
|
|
200
|
+
readonly is_entry: false;
|
|
201
|
+
readonly is_view: true;
|
|
202
|
+
readonly generic_type_params: readonly [];
|
|
203
|
+
readonly params: readonly ["0x1::object::Object<0x1::fungible_asset::Metadata>"];
|
|
204
|
+
readonly return: readonly ["0x1::string::String"];
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "sudo_multisend";
|
|
207
|
+
readonly visibility: "public";
|
|
208
|
+
readonly is_entry: true;
|
|
209
|
+
readonly is_view: false;
|
|
210
|
+
readonly generic_type_params: readonly [];
|
|
211
|
+
readonly params: readonly ["&signer", "&signer", "0x1::object::Object<0x1::fungible_asset::Metadata>", "vector<address>", "vector<u64>"];
|
|
212
|
+
readonly return: readonly [];
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "unfreeze_coin_store";
|
|
215
|
+
readonly visibility: "public";
|
|
216
|
+
readonly is_entry: false;
|
|
217
|
+
readonly is_view: false;
|
|
218
|
+
readonly generic_type_params: readonly [];
|
|
219
|
+
readonly params: readonly ["&0x1::coin::FreezeCapability", "address"];
|
|
220
|
+
readonly return: readonly [];
|
|
221
|
+
}];
|
|
222
|
+
readonly structs: readonly [{
|
|
223
|
+
readonly name: "BurnCapability";
|
|
224
|
+
readonly is_native: false;
|
|
225
|
+
readonly abilities: readonly ["drop", "store"];
|
|
226
|
+
readonly generic_type_params: readonly [];
|
|
227
|
+
readonly fields: readonly [{
|
|
228
|
+
readonly name: "metadata";
|
|
229
|
+
readonly type: "0x1::object::Object<0x1::fungible_asset::Metadata>";
|
|
230
|
+
}];
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "Coin";
|
|
233
|
+
readonly is_native: false;
|
|
234
|
+
readonly abilities: readonly [];
|
|
235
|
+
readonly generic_type_params: readonly [{
|
|
236
|
+
readonly constraints: readonly [];
|
|
237
|
+
readonly is_phantom: true;
|
|
238
|
+
}];
|
|
239
|
+
readonly fields: readonly [{
|
|
240
|
+
readonly name: "dummy_field";
|
|
241
|
+
readonly type: "bool";
|
|
242
|
+
}];
|
|
243
|
+
}, {
|
|
244
|
+
readonly name: "CoinCreatedEvent";
|
|
245
|
+
readonly is_native: false;
|
|
246
|
+
readonly abilities: readonly ["drop", "store"];
|
|
247
|
+
readonly generic_type_params: readonly [];
|
|
248
|
+
readonly fields: readonly [{
|
|
249
|
+
readonly name: "metadata_addr";
|
|
250
|
+
readonly type: "address";
|
|
251
|
+
}];
|
|
252
|
+
}, {
|
|
253
|
+
readonly name: "FreezeCapability";
|
|
254
|
+
readonly is_native: false;
|
|
255
|
+
readonly abilities: readonly ["drop", "store"];
|
|
256
|
+
readonly generic_type_params: readonly [];
|
|
257
|
+
readonly fields: readonly [{
|
|
258
|
+
readonly name: "metadata";
|
|
259
|
+
readonly type: "0x1::object::Object<0x1::fungible_asset::Metadata>";
|
|
260
|
+
}];
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "ManagingRefs";
|
|
263
|
+
readonly is_native: false;
|
|
264
|
+
readonly abilities: readonly ["key"];
|
|
265
|
+
readonly generic_type_params: readonly [];
|
|
266
|
+
readonly fields: readonly [{
|
|
267
|
+
readonly name: "mint_ref";
|
|
268
|
+
readonly type: "0x1::fungible_asset::MintRef";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "burn_ref";
|
|
271
|
+
readonly type: "0x1::fungible_asset::BurnRef";
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "transfer_ref";
|
|
274
|
+
readonly type: "0x1::fungible_asset::TransferRef";
|
|
275
|
+
}];
|
|
276
|
+
}, {
|
|
277
|
+
readonly name: "MintCapability";
|
|
278
|
+
readonly is_native: false;
|
|
279
|
+
readonly abilities: readonly ["drop", "store"];
|
|
280
|
+
readonly generic_type_params: readonly [];
|
|
281
|
+
readonly fields: readonly [{
|
|
282
|
+
readonly name: "metadata";
|
|
283
|
+
readonly type: "0x1::object::Object<0x1::fungible_asset::Metadata>";
|
|
284
|
+
}];
|
|
285
|
+
}];
|
|
286
|
+
};
|
|
287
|
+
//# sourceMappingURL=initia_coin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initia_coin.d.ts","sourceRoot":"","sources":["../../../src/abi/initia_coin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4WlB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ABIEntryClient, ABIViewClient, ABIRoot, EntryPayload, ViewPayload, DefaultABITable, ABIResourceClient } from '../types/index.js';
|
|
2
2
|
import { ABITable } from '../types/defaultABITable.js';
|
|
3
3
|
import { Aptos, LedgerVersionArg, MoveValue, Account, CommittedTransactionResponse, PublicKey, AccountAddressInput, UserTransactionResponse, WaitForTransactionOptions } from '@aptos-labs/ts-sdk';
|
|
4
|
+
import { RESTClient } from '@initia/initia.js';
|
|
4
5
|
/**
|
|
5
6
|
* Create a client to interact with Aptos smart contract.
|
|
6
7
|
*
|
|
@@ -9,10 +10,11 @@ import { Aptos, LedgerVersionArg, MoveValue, Account, CommittedTransactionRespon
|
|
|
9
10
|
* @example
|
|
10
11
|
* const client = createSurfClient(new Aptos());
|
|
11
12
|
*/
|
|
12
|
-
export declare function createSurfClient<TABITable extends ABITable = DefaultABITable>(aptosClient: Aptos): Client<TABITable>;
|
|
13
|
+
export declare function createSurfClient<TABITable extends ABITable = DefaultABITable>(aptosClient: Aptos | RESTClient): Client<TABITable>;
|
|
13
14
|
export declare class Client<TABITable extends ABITable> {
|
|
14
|
-
private client
|
|
15
|
-
|
|
15
|
+
private client?;
|
|
16
|
+
private initiaClient?;
|
|
17
|
+
constructor(client: Aptos | RESTClient);
|
|
16
18
|
/**
|
|
17
19
|
* Queries for a Move view function
|
|
18
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/core/Client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,4BAA4B,EAC5B,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/core/Client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,4BAA4B,EAC5B,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,SAAS,QAAQ,GAAG,eAAe,EAC3E,WAAW,EAAE,KAAK,GAAG,UAAU,GAC9B,MAAM,CAAC,SAAS,CAAC,CAEnB;AAED,qBAAa,MAAM,CAAC,SAAS,SAAS,QAAQ;IAC5C,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,YAAY,CAAC,CAAa;gBAEtB,MAAM,EAAE,KAAK,GAAG,UAAU;IAQtC;;;;;;;;;;;;;OAaG;IACU,IAAI,CAAC,OAAO,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE;QACnD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,EAAE,gBAAgB,CAAC;KAC5B,GAAG,OAAO,CAAC,OAAO,CAAC;IAqDpB;;;;;;;;;;;;;;;;;;OAkBG;IACU,iBAAiB,CAAC,IAAI,EAAE;QACnC,MAAM,EAAE,OAAO,CAAC;QAChB,OAAO,EAAE,YAAY,CAAC;QACtB,OAAO,CAAC,EAAE,yBAAyB,CAAC;KACrC,GAAG,OAAO,CAAC,4BAA4B,CAAC;IA6BzC;;;;;;;;;;;;;;;;;;;OAmBG;IACU,mBAAmB,CAAC,IAAI,EAAE;QACrC,SAAS,EAAE,SAAS,CAAC;QACrB,MAAM,EAAE,mBAAmB,CAAC;QAC5B,OAAO,EAAE,YAAY,CAAC;KACvB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAsBpC;;;;;;;;OAQG;IACU,QAAQ,CAAC,CAAC,SAAS,OAAO,EACrC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,CAAC,CAAC;IAeb;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;QAErD;;;;;;;;WAQG;;QAqBH;;;;;;;;;WASG;;QA2BH;;;;;;;;WAQG;;;CAkCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletClient.d.ts","sourceRoot":"","sources":["../../../src/core/WalletClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"WalletClient.d.ts","sourceRoot":"","sources":["../../../src/core/WalletClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEhF,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAE3C,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAS;gBAEX,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;IAI7B,iBAAiB,CAC5B,OAAO,EAAE,YAAY,GAEpB,OAAO,CAAC,GAAG,CAAC;IAqBR,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,GAAG,EAAE,CAAC;CAexC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEntryPayload.d.ts","sourceRoot":"","sources":["../../../src/core/createEntryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,YAAY,EACZ,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,SAAS,OAAO,EACjB,SAAS,SAAS,iBAAiB,CAAC,CAAC,CAAC,EACtC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"createEntryPayload.d.ts","sourceRoot":"","sources":["../../../src/core/createEntryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,YAAY,EACZ,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,SAAS,OAAO,EACjB,SAAS,SAAS,iBAAiB,CAAC,CAAC,CAAC,EACtC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,YAAY,CAqClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSubmitTransaction.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSubmitTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSubmitTransaction.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSubmitTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAOrE,eAAO,MAAM,oBAAoB;iCAqBpB,YAAY,YACX,+BAA+B,KAExC,QAAQ,GAAG,CAAC;;;;;;CAkFhB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The types for the `Client` class.
|
|
3
3
|
*/
|
|
4
|
-
import { ABIRoot } from '../abi.js';
|
|
4
|
+
import { ABIFunction, ABIRoot } from '../abi.js';
|
|
5
5
|
import { EntryFunctionName, ExtractArgsTypeOmitSigner, ExtractGenericArgsType, ViewFunctionName, ExtractArgsType } from '../extractor/functionExtractor.js';
|
|
6
6
|
import { EntryFunctionArgumentTypes, MoveFunctionId, SimpleEntryFunctionArgumentTypes, TypeTag, ViewFunctionABI } from '@aptos-labs/ts-sdk';
|
|
7
7
|
export type TransactionResponse = {
|
|
@@ -14,6 +14,7 @@ export type EntryPayload = {
|
|
|
14
14
|
function: MoveFunctionId;
|
|
15
15
|
typeArguments: Array<string>;
|
|
16
16
|
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
17
|
+
abi?: ABIFunction;
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
19
20
|
* The input payload type of `createEntryPayload`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/types/client/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/types/client/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,gCAAgC,EAChC,OAAO,EACP,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,iBAAiB,EAAE,KAAK,CACtB,0BAA0B,GAAG,gCAAgC,CAC9D,CAAC;IACF,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAC7B,CAAC,SAAS,OAAO,EACjB,SAAS,SAAS,iBAAiB,CAAC,CAAC,CAAC,IACpC;IACF,OAAO,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,EAAE,yBAAyB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC3D,aAAa,EAAE,sBAAsB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS,OAAO,EACjB,SAAS,SAAS,gBAAgB,CAAC,CAAC,CAAC,IACnC;IACF,OAAO,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,EAAE,eAAe,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACjD,aAAa,EAAE,sBAAsB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,QAAQ,IAAI;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,KAAK,CACvB,0BAA0B,GAAG,gCAAgC,CAC9D,CAAC;IACF,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper function to encode arguments using BCS based on their type
|
|
3
|
+
*
|
|
4
|
+
* @param arg The argument to encode
|
|
5
|
+
* @param typeStr The type of the argument as a string
|
|
6
|
+
* @returns Base64 encoded BCS serialized value
|
|
7
|
+
*/
|
|
8
|
+
export declare function bcsEncoding(arg: any, typeStr: string, target?: 'base64' | 'bytes'): string;
|
|
9
|
+
//# sourceMappingURL=bcs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bcs.d.ts","sourceRoot":"","sources":["../../../src/utils/bcs.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,QAAQ,GAAG,OAAkB,GACpC,MAAM,CA0FR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thalalabs/surf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "TypeScript Interfaces & React Hooks for interacting with Aptos Smart Contracts with type safety.",
|
|
5
5
|
"main": "./build/cjs/index.js",
|
|
6
6
|
"module": "./build/esm/index.js",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@types/node": "~18",
|
|
41
41
|
"@types/react": "^18.2.8",
|
|
42
42
|
"@typescript-eslint/eslint-plugin": "~5.62",
|
|
43
|
+
"@initia/react-wallet-widget": "^1.1.0",
|
|
43
44
|
"@typescript-eslint/parser": "~5.62",
|
|
44
45
|
"eslint": "~8.57",
|
|
45
46
|
"eslint-config-prettier": "~9.1",
|
|
@@ -58,7 +59,8 @@
|
|
|
58
59
|
"peerDependencies": {
|
|
59
60
|
"@aptos-labs/ts-sdk": "^1.35.0",
|
|
60
61
|
"@aptos-labs/wallet-adapter-react": "^3.7.11",
|
|
61
|
-
"react": "^18.2.0"
|
|
62
|
+
"react": "^18.2.0",
|
|
63
|
+
"@initia/react-wallet-widget": "^1.1.0"
|
|
62
64
|
},
|
|
63
65
|
"peerDependenciesMeta": {
|
|
64
66
|
"@aptos-labs/wallet-adapter-react": {
|
|
@@ -66,6 +68,9 @@
|
|
|
66
68
|
},
|
|
67
69
|
"react": {
|
|
68
70
|
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"@initia/react-wallet-widget": {
|
|
73
|
+
"optional": true
|
|
69
74
|
}
|
|
70
75
|
},
|
|
71
76
|
"scripts": {
|
|
@@ -99,5 +104,8 @@
|
|
|
99
104
|
"type": "git",
|
|
100
105
|
"url": "git+https://github.com/ThalaLabs/surf"
|
|
101
106
|
},
|
|
102
|
-
"license": "MIT"
|
|
107
|
+
"license": "MIT",
|
|
108
|
+
"dependencies": {
|
|
109
|
+
"@initia/initia.js": "^1.0.0"
|
|
110
|
+
}
|
|
103
111
|
}
|