passkey-kit 0.12.1 → 0.14.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.
Files changed (172) hide show
  1. package/README.md +408 -227
  2. package/{types → dist}/base.d.ts +1 -0
  3. package/dist/base.d.ts.map +1 -0
  4. package/{src/base.ts → dist/base.js} +8 -10
  5. package/dist/base.js.map +1 -0
  6. package/dist/base64url.d.ts +18 -0
  7. package/dist/base64url.d.ts.map +1 -0
  8. package/dist/base64url.js +18 -0
  9. package/dist/base64url.js.map +1 -0
  10. package/dist/constants.d.ts +91 -0
  11. package/dist/constants.d.ts.map +1 -0
  12. package/dist/constants.js +115 -0
  13. package/dist/constants.js.map +1 -0
  14. package/dist/contract-errors.d.ts +69 -0
  15. package/dist/contract-errors.d.ts.map +1 -0
  16. package/dist/contract-errors.js +132 -0
  17. package/dist/contract-errors.js.map +1 -0
  18. package/dist/errors.d.ts +163 -0
  19. package/dist/errors.d.ts.map +1 -0
  20. package/dist/errors.js +244 -0
  21. package/dist/errors.js.map +1 -0
  22. package/dist/events.d.ts +94 -0
  23. package/dist/events.d.ts.map +1 -0
  24. package/dist/events.js +92 -0
  25. package/dist/events.js.map +1 -0
  26. package/dist/index.d.ts +22 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +36 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/indexer/codec.d.ts +18 -0
  31. package/dist/indexer/codec.d.ts.map +1 -0
  32. package/dist/indexer/codec.js +32 -0
  33. package/dist/indexer/codec.js.map +1 -0
  34. package/dist/indexer/index.d.ts +25 -0
  35. package/dist/indexer/index.d.ts.map +1 -0
  36. package/dist/indexer/index.js +34 -0
  37. package/dist/indexer/index.js.map +1 -0
  38. package/dist/indexer/mercury.d.ts +94 -0
  39. package/dist/indexer/mercury.d.ts.map +1 -0
  40. package/dist/indexer/mercury.js +245 -0
  41. package/dist/indexer/mercury.js.map +1 -0
  42. package/dist/indexer/stellar-indexer.d.ts +115 -0
  43. package/dist/indexer/stellar-indexer.d.ts.map +1 -0
  44. package/dist/indexer/stellar-indexer.js +279 -0
  45. package/dist/indexer/stellar-indexer.js.map +1 -0
  46. package/dist/indexer/types.d.ts +73 -0
  47. package/dist/indexer/types.d.ts.map +1 -0
  48. package/dist/indexer/types.js +9 -0
  49. package/dist/indexer/types.js.map +1 -0
  50. package/dist/kit/auth-payload.d.ts +106 -0
  51. package/dist/kit/auth-payload.d.ts.map +1 -0
  52. package/dist/kit/auth-payload.js +227 -0
  53. package/dist/kit/auth-payload.js.map +1 -0
  54. package/dist/kit/deploy-ops.d.ts +45 -0
  55. package/dist/kit/deploy-ops.d.ts.map +1 -0
  56. package/dist/kit/deploy-ops.js +69 -0
  57. package/dist/kit/deploy-ops.js.map +1 -0
  58. package/dist/kit/tx-ops.d.ts +95 -0
  59. package/dist/kit/tx-ops.d.ts.map +1 -0
  60. package/dist/kit/tx-ops.js +125 -0
  61. package/dist/kit/tx-ops.js.map +1 -0
  62. package/dist/kit/wallet-ops.d.ts +59 -0
  63. package/dist/kit/wallet-ops.d.ts.map +1 -0
  64. package/dist/kit/wallet-ops.js +122 -0
  65. package/dist/kit/wallet-ops.js.map +1 -0
  66. package/dist/kit/webauthn-ops.d.ts +55 -0
  67. package/dist/kit/webauthn-ops.d.ts.map +1 -0
  68. package/dist/kit/webauthn-ops.js +79 -0
  69. package/dist/kit/webauthn-ops.js.map +1 -0
  70. package/dist/kit.d.ts +132 -0
  71. package/dist/kit.d.ts.map +1 -0
  72. package/dist/kit.js +290 -0
  73. package/dist/kit.js.map +1 -0
  74. package/dist/managers/credential-manager.d.ts +39 -0
  75. package/dist/managers/credential-manager.d.ts.map +1 -0
  76. package/dist/managers/credential-manager.js +47 -0
  77. package/dist/managers/credential-manager.js.map +1 -0
  78. package/dist/managers/index.d.ts +7 -0
  79. package/dist/managers/index.d.ts.map +1 -0
  80. package/dist/managers/index.js +7 -0
  81. package/dist/managers/index.js.map +1 -0
  82. package/dist/managers/signer-manager.d.ts +62 -0
  83. package/dist/managers/signer-manager.d.ts.map +1 -0
  84. package/dist/managers/signer-manager.js +111 -0
  85. package/dist/managers/signer-manager.js.map +1 -0
  86. package/dist/managers/submission-manager.d.ts +52 -0
  87. package/dist/managers/submission-manager.d.ts.map +1 -0
  88. package/dist/managers/submission-manager.js +77 -0
  89. package/dist/managers/submission-manager.js.map +1 -0
  90. package/dist/relayer.d.ts +61 -0
  91. package/dist/relayer.d.ts.map +1 -0
  92. package/dist/relayer.js +122 -0
  93. package/dist/relayer.js.map +1 -0
  94. package/dist/rpc-data.d.ts +45 -0
  95. package/dist/rpc-data.d.ts.map +1 -0
  96. package/dist/rpc-data.js +61 -0
  97. package/dist/rpc-data.js.map +1 -0
  98. package/dist/sac.d.ts +31 -0
  99. package/dist/sac.d.ts.map +1 -0
  100. package/dist/sac.js +47 -0
  101. package/dist/sac.js.map +1 -0
  102. package/dist/server.d.ts +79 -0
  103. package/dist/server.d.ts.map +1 -0
  104. package/dist/server.js +152 -0
  105. package/dist/server.js.map +1 -0
  106. package/dist/signers.d.ts +83 -0
  107. package/dist/signers.d.ts.map +1 -0
  108. package/dist/signers.js +124 -0
  109. package/dist/signers.js.map +1 -0
  110. package/dist/storage/index.d.ts +13 -0
  111. package/dist/storage/index.d.ts.map +1 -0
  112. package/dist/storage/index.js +12 -0
  113. package/dist/storage/index.js.map +1 -0
  114. package/dist/storage/indexeddb.d.ts +26 -0
  115. package/dist/storage/indexeddb.d.ts.map +1 -0
  116. package/dist/storage/indexeddb.js +100 -0
  117. package/dist/storage/indexeddb.js.map +1 -0
  118. package/dist/storage/localStorage.d.ts +22 -0
  119. package/dist/storage/localStorage.d.ts.map +1 -0
  120. package/dist/storage/localStorage.js +86 -0
  121. package/dist/storage/localStorage.js.map +1 -0
  122. package/dist/storage/memory.d.ts +18 -0
  123. package/dist/storage/memory.d.ts.map +1 -0
  124. package/dist/storage/memory.js +41 -0
  125. package/dist/storage/memory.js.map +1 -0
  126. package/dist/types.d.ts +136 -0
  127. package/dist/types.d.ts.map +1 -0
  128. package/dist/types.js +39 -0
  129. package/dist/types.js.map +1 -0
  130. package/dist/utils.d.ts +72 -0
  131. package/dist/utils.d.ts.map +1 -0
  132. package/dist/utils.js +253 -0
  133. package/dist/utils.js.map +1 -0
  134. package/dist/validation.d.ts +42 -0
  135. package/dist/validation.d.ts.map +1 -0
  136. package/dist/validation.js +75 -0
  137. package/dist/validation.js.map +1 -0
  138. package/dist/version.d.ts +7 -0
  139. package/dist/version.d.ts.map +1 -0
  140. package/dist/version.js +9 -0
  141. package/dist/version.js.map +1 -0
  142. package/package.json +47 -20
  143. package/.claude/settings.local.json +0 -20
  144. package/.cursorrules +0 -170
  145. package/.gitattributes +0 -2
  146. package/.github/workflows/release.yml +0 -21
  147. package/.vscode/settings.json +0 -6
  148. package/PROPOSAL.md +0 -397
  149. package/cheatsheet.txt +0 -18
  150. package/clone-js-sdk.sh +0 -21
  151. package/packages/passkey-kit-sdk/README.md +0 -54
  152. package/packages/passkey-kit-sdk/package.json +0 -21
  153. package/packages/passkey-kit-sdk/src/index.ts +0 -171
  154. package/packages/passkey-kit-sdk/tsconfig.json +0 -98
  155. package/packages/passkey-kit-sdk/types/index.d.ts +0 -190
  156. package/packages/sac-sdk/README.md +0 -54
  157. package/packages/sac-sdk/package.json +0 -21
  158. package/packages/sac-sdk/src/index.ts +0 -586
  159. package/packages/sac-sdk/tsconfig.json +0 -98
  160. package/packages/sac-sdk/types/index.d.ts +0 -532
  161. package/pnpm-workspace.yaml +0 -2
  162. package/src/index.ts +0 -5
  163. package/src/kit.ts +0 -823
  164. package/src/sac.ts +0 -29
  165. package/src/server.ts +0 -179
  166. package/src/types.ts +0 -32
  167. package/tsconfig.json +0 -28
  168. package/types/index.d.ts +0 -5
  169. package/types/kit.d.ts +0 -95
  170. package/types/sac.d.ts +0 -13
  171. package/types/server.d.ts +0 -29
  172. package/types/types.d.ts +0 -22
@@ -1,586 +0,0 @@
1
- import { Buffer } from "buffer";
2
- import {
3
- AssembledTransaction,
4
- Client as ContractClient,
5
- ClientOptions as ContractClientOptions,
6
- MethodOptions,
7
- Spec as ContractSpec,
8
- } from '@stellar/stellar-sdk/contract';
9
- import type {
10
- u32,
11
- i128,
12
- } from '@stellar/stellar-sdk/contract';
13
-
14
- if (typeof window !== 'undefined') {
15
- //@ts-ignore Buffer exists
16
- window.Buffer = window.Buffer || Buffer;
17
- }
18
-
19
- export interface Client {
20
- /**
21
- * Construct and simulate a allowance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
22
- * Returns the allowance for `spender` to transfer from `from`.
23
- *
24
- * The amount returned is the amount that spender is allowed to transfer
25
- * out of from's balance. When the spender transfers amounts, the allowance
26
- * will be reduced by the amount transferred.
27
- *
28
- * # Arguments
29
- *
30
- * * `from` - The address holding the balance of tokens to be drawn from.
31
- * * `spender` - The address spending the tokens held by `from`.
32
- */
33
- allowance: ({ from, spender }: { from: string, spender: string }, options?: {
34
- /**
35
- * The fee to pay for the transaction. Default: BASE_FEE
36
- */
37
- fee?: number;
38
-
39
- /**
40
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
41
- */
42
- timeoutInSeconds?: number;
43
-
44
- /**
45
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
46
- */
47
- simulate?: boolean;
48
- }) => Promise<AssembledTransaction<i128>>
49
-
50
- /**
51
- * Construct and simulate a authorized transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
52
- * Returns true if `id` is authorized to use its balance.
53
- *
54
- * # Arguments
55
- *
56
- * * `id` - The address for which token authorization is being checked.
57
- */
58
- authorized: ({ id }: { id: string }, options?: {
59
- /**
60
- * The fee to pay for the transaction. Default: BASE_FEE
61
- */
62
- fee?: number;
63
-
64
- /**
65
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
66
- */
67
- timeoutInSeconds?: number;
68
-
69
- /**
70
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
71
- */
72
- simulate?: boolean;
73
- }) => Promise<AssembledTransaction<boolean>>
74
-
75
- /**
76
- * Construct and simulate a approve transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
77
- * Set the allowance by `amount` for `spender` to transfer/burn from
78
- * `from`.
79
- *
80
- * The amount set is the amount that spender is approved to transfer out of
81
- * from's balance. The spender will be allowed to transfer amounts, and
82
- * when an amount is transferred the allowance will be reduced by the
83
- * amount transferred.
84
- *
85
- * # Arguments
86
- *
87
- * * `from` - The address holding the balance of tokens to be drawn from.
88
- * * `spender` - The address being authorized to spend the tokens held by
89
- * `from`.
90
- * * `amount` - The tokens to be made available to `spender`.
91
- * * `expiration_ledger` - The ledger number where this allowance expires. Cannot
92
- * be less than the current ledger number unless the amount is being set to 0.
93
- * An expired entry (where expiration_ledger < the current ledger number)
94
- * should be treated as a 0 amount allowance.
95
- *
96
- * # Events
97
- *
98
- * Emits an event with topics `["approve", from: Address,
99
- * spender: Address], data = [amount: i128, expiration_ledger: u32]`
100
- */
101
- approve: ({ from, spender, amount, expiration_ledger }: { from: string, spender: string, amount: i128, expiration_ledger: u32 }, options?: {
102
- /**
103
- * The fee to pay for the transaction. Default: BASE_FEE
104
- */
105
- fee?: number;
106
-
107
- /**
108
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
109
- */
110
- timeoutInSeconds?: number;
111
-
112
- /**
113
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
114
- */
115
- simulate?: boolean;
116
- }) => Promise<AssembledTransaction<null>>
117
-
118
- /**
119
- * Construct and simulate a balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
120
- * Returns the balance of `id`.
121
- *
122
- * # Arguments
123
- *
124
- * * `id` - The address for which a balance is being queried. If the
125
- * address has no existing balance, returns 0.
126
- */
127
- balance: ({ id }: { id: string }, options?: {
128
- /**
129
- * The fee to pay for the transaction. Default: BASE_FEE
130
- */
131
- fee?: number;
132
-
133
- /**
134
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
135
- */
136
- timeoutInSeconds?: number;
137
-
138
- /**
139
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
140
- */
141
- simulate?: boolean;
142
- }) => Promise<AssembledTransaction<i128>>
143
-
144
- /**
145
- * Construct and simulate a burn transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
146
- * Burn `amount` from `from`.
147
- *
148
- * Reduces from's balance by the amount, without transferring the balance
149
- * to another holder's balance.
150
- *
151
- * # Arguments
152
- *
153
- * * `from` - The address holding the balance of tokens which will be
154
- * burned from.
155
- * * `amount` - The amount of tokens to be burned.
156
- *
157
- * # Events
158
- *
159
- * Emits an event with topics `["burn", from: Address], data = amount:
160
- * i128`
161
- */
162
- burn: ({ from, amount }: { from: string, amount: i128 }, options?: {
163
- /**
164
- * The fee to pay for the transaction. Default: BASE_FEE
165
- */
166
- fee?: number;
167
-
168
- /**
169
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
170
- */
171
- timeoutInSeconds?: number;
172
-
173
- /**
174
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
175
- */
176
- simulate?: boolean;
177
- }) => Promise<AssembledTransaction<null>>
178
-
179
- /**
180
- * Construct and simulate a burn_from transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
181
- * Burn `amount` from `from`, consuming the allowance of `spender`.
182
- *
183
- * Reduces from's balance by the amount, without transferring the balance
184
- * to another holder's balance.
185
- *
186
- * The spender will be allowed to burn the amount from from's balance, if
187
- * the amount is less than or equal to the allowance that the spender has
188
- * on the from's balance. The spender's allowance on from's balance will be
189
- * reduced by the amount.
190
- *
191
- * # Arguments
192
- *
193
- * * `spender` - The address authorizing the burn, and having its allowance
194
- * consumed during the burn.
195
- * * `from` - The address holding the balance of tokens which will be
196
- * burned from.
197
- * * `amount` - The amount of tokens to be burned.
198
- *
199
- * # Events
200
- *
201
- * Emits an event with topics `["burn", from: Address], data = amount:
202
- * i128`
203
- */
204
- burn_from: ({ spender, from, amount }: { spender: string, from: string, amount: i128 }, options?: {
205
- /**
206
- * The fee to pay for the transaction. Default: BASE_FEE
207
- */
208
- fee?: number;
209
-
210
- /**
211
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
212
- */
213
- timeoutInSeconds?: number;
214
-
215
- /**
216
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
217
- */
218
- simulate?: boolean;
219
- }) => Promise<AssembledTransaction<null>>
220
-
221
- /**
222
- * Construct and simulate a clawback transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
223
- * Clawback `amount` from `from` account. `amount` is burned in the
224
- * clawback process.
225
- *
226
- * # Arguments
227
- *
228
- * * `from` - The address holding the balance from which the clawback will
229
- * take tokens.
230
- * * `amount` - The amount of tokens to be clawed back.
231
- *
232
- * # Events
233
- *
234
- * Emits an event with topics `["clawback", admin: Address, to: Address],
235
- * data = amount: i128`
236
- */
237
- clawback: ({ from, amount }: { from: string, amount: i128 }, options?: {
238
- /**
239
- * The fee to pay for the transaction. Default: BASE_FEE
240
- */
241
- fee?: number;
242
-
243
- /**
244
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
245
- */
246
- timeoutInSeconds?: number;
247
-
248
- /**
249
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
250
- */
251
- simulate?: boolean;
252
- }) => Promise<AssembledTransaction<null>>
253
-
254
- /**
255
- * Construct and simulate a decimals transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
256
- * Returns the number of decimals used to represent amounts of this token.
257
- *
258
- * # Panics
259
- *
260
- * If the contract has not yet been initialized.
261
- */
262
- decimals: (options?: {
263
- /**
264
- * The fee to pay for the transaction. Default: BASE_FEE
265
- */
266
- fee?: number;
267
-
268
- /**
269
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
270
- */
271
- timeoutInSeconds?: number;
272
-
273
- /**
274
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
275
- */
276
- simulate?: boolean;
277
- }) => Promise<AssembledTransaction<u32>>
278
-
279
- /**
280
- * Construct and simulate a mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
281
- * Mints `amount` to `to`.
282
- *
283
- * # Arguments
284
- *
285
- * * `to` - The address which will receive the minted tokens.
286
- * * `amount` - The amount of tokens to be minted.
287
- *
288
- * # Events
289
- *
290
- * Emits an event with topics `["mint", admin: Address, to: Address], data
291
- * = amount: i128`
292
- */
293
- mint: ({ to, amount }: { to: string, amount: i128 }, options?: {
294
- /**
295
- * The fee to pay for the transaction. Default: BASE_FEE
296
- */
297
- fee?: number;
298
-
299
- /**
300
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
301
- */
302
- timeoutInSeconds?: number;
303
-
304
- /**
305
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
306
- */
307
- simulate?: boolean;
308
- }) => Promise<AssembledTransaction<null>>
309
-
310
- /**
311
- * Construct and simulate a name transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
312
- * Returns the name for this token.
313
- *
314
- * # Panics
315
- *
316
- * If the contract has not yet been initialized.
317
- */
318
- name: (options?: {
319
- /**
320
- * The fee to pay for the transaction. Default: BASE_FEE
321
- */
322
- fee?: number;
323
-
324
- /**
325
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
326
- */
327
- timeoutInSeconds?: number;
328
-
329
- /**
330
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
331
- */
332
- simulate?: boolean;
333
- }) => Promise<AssembledTransaction<string>>
334
-
335
- /**
336
- * Construct and simulate a set_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
337
- * Sets the administrator to the specified address `new_admin`.
338
- *
339
- * # Arguments
340
- *
341
- * * `new_admin` - The address which will henceforth be the administrator
342
- * of this token contract.
343
- *
344
- * # Events
345
- *
346
- * Emits an event with topics `["set_admin", admin: Address], data =
347
- * [new_admin: Address]`
348
- */
349
- set_admin: ({ new_admin }: { new_admin: string }, options?: {
350
- /**
351
- * The fee to pay for the transaction. Default: BASE_FEE
352
- */
353
- fee?: number;
354
-
355
- /**
356
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
357
- */
358
- timeoutInSeconds?: number;
359
-
360
- /**
361
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
362
- */
363
- simulate?: boolean;
364
- }) => Promise<AssembledTransaction<null>>
365
-
366
- /**
367
- * Construct and simulate a admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
368
- * Returns the admin of the contract.
369
- *
370
- * # Panics
371
- *
372
- * If the admin is not set.
373
- */
374
- admin: (options?: {
375
- /**
376
- * The fee to pay for the transaction. Default: BASE_FEE
377
- */
378
- fee?: number;
379
-
380
- /**
381
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
382
- */
383
- timeoutInSeconds?: number;
384
-
385
- /**
386
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
387
- */
388
- simulate?: boolean;
389
- }) => Promise<AssembledTransaction<string>>
390
-
391
- /**
392
- * Construct and simulate a set_authorized transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
393
- * Sets whether the account is authorized to use its balance. If
394
- * `authorized` is true, `id` should be able to use its balance.
395
- *
396
- * # Arguments
397
- *
398
- * * `id` - The address being (de-)authorized.
399
- * * `authorize` - Whether or not `id` can use its balance.
400
- *
401
- * # Events
402
- *
403
- * Emits an event with topics `["set_authorized", id: Address], data =
404
- * [authorize: bool]`
405
- */
406
- set_authorized: ({ id, authorize }: { id: string, authorize: boolean }, options?: {
407
- /**
408
- * The fee to pay for the transaction. Default: BASE_FEE
409
- */
410
- fee?: number;
411
-
412
- /**
413
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
414
- */
415
- timeoutInSeconds?: number;
416
-
417
- /**
418
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
419
- */
420
- simulate?: boolean;
421
- }) => Promise<AssembledTransaction<null>>
422
-
423
- /**
424
- * Construct and simulate a symbol transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
425
- * Returns the symbol for this token.
426
- *
427
- * # Panics
428
- *
429
- * If the contract has not yet been initialized.
430
- */
431
- symbol: (options?: {
432
- /**
433
- * The fee to pay for the transaction. Default: BASE_FEE
434
- */
435
- fee?: number;
436
-
437
- /**
438
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
439
- */
440
- timeoutInSeconds?: number;
441
-
442
- /**
443
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
444
- */
445
- simulate?: boolean;
446
- }) => Promise<AssembledTransaction<string>>
447
-
448
- /**
449
- * Construct and simulate a transfer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
450
- * Transfer `amount` from `from` to `to`.
451
- *
452
- * # Arguments
453
- *
454
- * * `from` - The address holding the balance of tokens which will be
455
- * withdrawn from.
456
- * * `to` - The address which will receive the transferred tokens.
457
- * * `amount` - The amount of tokens to be transferred.
458
- *
459
- * # Events
460
- *
461
- * Emits an event with topics `["transfer", from: Address, to: Address],
462
- * data = amount: i128`
463
- */
464
- transfer: ({ from, to, amount }: { from: string, to: string, amount: i128 }, options?: {
465
- /**
466
- * The fee to pay for the transaction. Default: BASE_FEE
467
- */
468
- fee?: number;
469
-
470
- /**
471
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
472
- */
473
- timeoutInSeconds?: number;
474
-
475
- /**
476
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
477
- */
478
- simulate?: boolean;
479
- }) => Promise<AssembledTransaction<null>>
480
-
481
- /**
482
- * Construct and simulate a transfer_from transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
483
- * Transfer `amount` from `from` to `to`, consuming the allowance that
484
- * `spender` has on `from`'s balance. Authorized by spender
485
- * (`spender.require_auth()`).
486
- *
487
- * The spender will be allowed to transfer the amount from from's balance
488
- * if the amount is less than or equal to the allowance that the spender
489
- * has on the from's balance. The spender's allowance on from's balance
490
- * will be reduced by the amount.
491
- *
492
- * # Arguments
493
- *
494
- * * `spender` - The address authorizing the transfer, and having its
495
- * allowance consumed during the transfer.
496
- * * `from` - The address holding the balance of tokens which will be
497
- * withdrawn from.
498
- * * `to` - The address which will receive the transferred tokens.
499
- * * `amount` - The amount of tokens to be transferred.
500
- *
501
- * # Events
502
- *
503
- * Emits an event with topics `["transfer", from: Address, to: Address],
504
- * data = amount: i128`
505
- */
506
- transfer_from: ({ spender, from, to, amount }: { spender: string, from: string, to: string, amount: i128 }, options?: {
507
- /**
508
- * The fee to pay for the transaction. Default: BASE_FEE
509
- */
510
- fee?: number;
511
-
512
- /**
513
- * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
514
- */
515
- timeoutInSeconds?: number;
516
-
517
- /**
518
- * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
519
- */
520
- simulate?: boolean;
521
- }) => Promise<AssembledTransaction<null>>
522
- }
523
- export class Client extends ContractClient {
524
- static async deploy<T = Client>(
525
- /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
526
- options: MethodOptions &
527
- Omit<ContractClientOptions, "contractId"> & {
528
- /** The hash of the Wasm blob, which must already be installed on-chain. */
529
- wasmHash: Buffer | string;
530
- /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
531
- salt?: Buffer | Uint8Array;
532
- /** The format used to decode `wasmHash`, if it's provided as a string. */
533
- format?: "hex" | "base64";
534
- address?: string;
535
- }
536
- ): Promise<AssembledTransaction<T>> {
537
- return ContractClient.deploy(null, options)
538
- }
539
- constructor(public readonly options: ContractClientOptions) {
540
- super(
541
- new ContractSpec(["AAAAAAAAAYpSZXR1cm5zIHRoZSBhbGxvd2FuY2UgZm9yIGBzcGVuZGVyYCB0byB0cmFuc2ZlciBmcm9tIGBmcm9tYC4KClRoZSBhbW91bnQgcmV0dXJuZWQgaXMgdGhlIGFtb3VudCB0aGF0IHNwZW5kZXIgaXMgYWxsb3dlZCB0byB0cmFuc2ZlcgpvdXQgb2YgZnJvbSdzIGJhbGFuY2UuIFdoZW4gdGhlIHNwZW5kZXIgdHJhbnNmZXJzIGFtb3VudHMsIHRoZSBhbGxvd2FuY2UKd2lsbCBiZSByZWR1Y2VkIGJ5IHRoZSBhbW91bnQgdHJhbnNmZXJyZWQuCgojIEFyZ3VtZW50cwoKKiBgZnJvbWAgLSBUaGUgYWRkcmVzcyBob2xkaW5nIHRoZSBiYWxhbmNlIG9mIHRva2VucyB0byBiZSBkcmF3biBmcm9tLgoqIGBzcGVuZGVyYCAtIFRoZSBhZGRyZXNzIHNwZW5kaW5nIHRoZSB0b2tlbnMgaGVsZCBieSBgZnJvbWAu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AAABAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAAA==",
559
- "AAAABQAAAAAAAAAAAAAADVRyYW5zZmVyTXV4ZWQAAAAAAAABAAAACHRyYW5zZmVyAAAABAAAAAAAAAAEZnJvbQAAABMAAAABAAAAAAAAAAJ0bwAAAAAAEwAAAAEAAAAAAAAAC3RvX211eGVkX2lkAAAAAAQAAAAAAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAAg==",
560
- "AAAABQAAAAAAAAAAAAAABEJ1cm4AAAABAAAABGJ1cm4AAAACAAAAAAAAAARmcm9tAAAAEwAAAAEAAAAAAAAABmFtb3VudAAAAAAACwAAAAAAAAAA",
561
- "AAAABQAAAAAAAAAAAAAABE1pbnQAAAABAAAABG1pbnQAAAACAAAAAAAAAAJ0bwAAAAAAEwAAAAEAAAAAAAAABmFtb3VudAAAAAAACwAAAAAAAAAA",
562
- "AAAABQAAAAAAAAAAAAAACENsYXdiYWNrAAAAAQAAAAhjbGF3YmFjawAAAAIAAAAAAAAABGZyb20AAAATAAAAAQAAAAAAAAAGYW1vdW50AAAAAAALAAAAAAAAAAA=",
563
- "AAAABQAAAAAAAAAAAAAACFNldEFkbWluAAAAAQAAAAlzZXRfYWRtaW4AAAAAAAABAAAAAAAAAAluZXdfYWRtaW4AAAAAAAATAAAAAAAAAAA=",
564
- "AAAABQAAAAAAAAAAAAAADVNldEF1dGhvcml6ZWQAAAAAAAABAAAADnNldF9hdXRob3JpemVkAAAAAAACAAAAAAAAAAJpZAAAAAAAEwAAAAEAAAAAAAAACWF1dGhvcml6ZQAAAAAAAAEAAAAAAAAAAA=="]),
565
- options
566
- )
567
- }
568
- public readonly fromJSON = {
569
- allowance: this.txFromJSON<i128>,
570
- authorized: this.txFromJSON<boolean>,
571
- approve: this.txFromJSON<null>,
572
- balance: this.txFromJSON<i128>,
573
- burn: this.txFromJSON<null>,
574
- burn_from: this.txFromJSON<null>,
575
- clawback: this.txFromJSON<null>,
576
- decimals: this.txFromJSON<u32>,
577
- mint: this.txFromJSON<null>,
578
- name: this.txFromJSON<string>,
579
- set_admin: this.txFromJSON<null>,
580
- admin: this.txFromJSON<string>,
581
- set_authorized: this.txFromJSON<null>,
582
- symbol: this.txFromJSON<string>,
583
- transfer: this.txFromJSON<null>,
584
- transfer_from: this.txFromJSON<null>
585
- }
586
- }