passkey-kit 0.4.6 → 0.5.1

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.
@@ -0,0 +1,98 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+ /* Projects */
5
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
6
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
7
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
8
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
9
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
10
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
11
+ /* Language and Environment */
12
+ "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
14
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
15
+ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
16
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
17
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
18
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
19
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
20
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
21
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
22
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
23
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
24
+ /* Modules */
25
+ "module": "NodeNext", /* Specify what module code is generated. */
26
+ // "rootDir": "./", /* Specify the root folder within your source files. */
27
+ "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
28
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
30
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
31
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
32
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
33
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
34
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
35
+ // "resolveJsonModule": true, /* Enable importing .json files. */
36
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
37
+ /* JavaScript Support */
38
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
39
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
40
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
41
+ /* Emit */
42
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
43
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
44
+ "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
45
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
46
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
47
+ "outDir": "./types", /* Specify an output folder for all emitted files. */
48
+ // "removeComments": true, /* Disable emitting comments. */
49
+ // "noEmit": true, /* Disable emitting files from a compilation. */
50
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
51
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
52
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
53
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
54
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
55
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
56
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
57
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
58
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
59
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
60
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
61
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
62
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
63
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
64
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
65
+ /* Interop Constraints */
66
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
67
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
68
+ // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
69
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
70
+ // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
71
+ /* Type Checking */
72
+ // "strict": true, /* Enable all strict type-checking options. */
73
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
74
+ "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
75
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
76
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
77
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
78
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
79
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
80
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
81
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
82
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
83
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
84
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
85
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
86
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
87
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
88
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
89
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
90
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
91
+ /* Completeness */
92
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
93
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
94
+ },
95
+ "include": [
96
+ "src/*"
97
+ ]
98
+ }
@@ -0,0 +1,527 @@
1
+ import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from '@stellar/stellar-sdk/contract';
2
+ import type { u32, i128 } from '@stellar/stellar-sdk/contract';
3
+ export declare const networks: {
4
+ readonly testnet: {
5
+ readonly networkPassphrase: "Test SDF Network ; September 2015";
6
+ readonly contractId: "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC";
7
+ };
8
+ };
9
+ export declare const Errors: {};
10
+ export interface Client {
11
+ /**
12
+ * 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.
13
+ * Returns the allowance for `spender` to transfer from `from`.
14
+ *
15
+ * The amount returned is the amount that spender is allowed to transfer
16
+ * out of from's balance. When the spender transfers amounts, the allowance
17
+ * will be reduced by the amount transfered.
18
+ *
19
+ * # Arguments
20
+ *
21
+ * * `from` - The address holding the balance of tokens to be drawn from.
22
+ * * `spender` - The address spending the tokens held by `from`.
23
+ */
24
+ allowance: ({ from, spender }: {
25
+ from: string;
26
+ spender: string;
27
+ }, options?: {
28
+ /**
29
+ * The fee to pay for the transaction. Default: BASE_FEE
30
+ */
31
+ fee?: number;
32
+ /**
33
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
34
+ */
35
+ timeoutInSeconds?: number;
36
+ /**
37
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
38
+ */
39
+ simulate?: boolean;
40
+ }) => Promise<AssembledTransaction<i128>>;
41
+ /**
42
+ * 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.
43
+ * Returns true if `id` is authorized to use its balance.
44
+ *
45
+ * # Arguments
46
+ *
47
+ * * `id` - The address for which token authorization is being checked.
48
+ */
49
+ authorized: ({ id }: {
50
+ id: string;
51
+ }, options?: {
52
+ /**
53
+ * The fee to pay for the transaction. Default: BASE_FEE
54
+ */
55
+ fee?: number;
56
+ /**
57
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
58
+ */
59
+ timeoutInSeconds?: number;
60
+ /**
61
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
62
+ */
63
+ simulate?: boolean;
64
+ }) => Promise<AssembledTransaction<boolean>>;
65
+ /**
66
+ * 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.
67
+ * Set the allowance by `amount` for `spender` to transfer/burn from
68
+ * `from`.
69
+ *
70
+ * The amount set is the amount that spender is approved to transfer out of
71
+ * from's balance. The spender will be allowed to transfer amounts, and
72
+ * when an amount is transferred the allowance will be reduced by the
73
+ * amount transfered.
74
+ *
75
+ * # Arguments
76
+ *
77
+ * * `from` - The address holding the balance of tokens to be drawn from.
78
+ * * `spender` - The address being authorized to spend the tokens held by
79
+ * `from`.
80
+ * * `amount` - The tokens to be made available to `spender`.
81
+ * * `expiration_ledger` - The ledger number where this allowance expires. Cannot
82
+ * be less than the current ledger number unless the amount is being set to 0.
83
+ * An expired entry (where expiration_ledger < the current ledger number)
84
+ * should be treated as a 0 amount allowance.
85
+ *
86
+ * # Events
87
+ *
88
+ * Emits an event with topics `["approve", from: Address,
89
+ * spender: Address], data = [amount: i128, expiration_ledger: u32]`
90
+ */
91
+ approve: ({ from, spender, amount, expiration_ledger }: {
92
+ from: string;
93
+ spender: string;
94
+ amount: i128;
95
+ expiration_ledger: u32;
96
+ }, options?: {
97
+ /**
98
+ * The fee to pay for the transaction. Default: BASE_FEE
99
+ */
100
+ fee?: number;
101
+ /**
102
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
103
+ */
104
+ timeoutInSeconds?: number;
105
+ /**
106
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
107
+ */
108
+ simulate?: boolean;
109
+ }) => Promise<AssembledTransaction<null>>;
110
+ /**
111
+ * 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.
112
+ * Returns the balance of `id`.
113
+ *
114
+ * # Arguments
115
+ *
116
+ * * `id` - The address for which a balance is being queried. If the
117
+ * address has no existing balance, returns 0.
118
+ */
119
+ balance: ({ id }: {
120
+ id: string;
121
+ }, options?: {
122
+ /**
123
+ * The fee to pay for the transaction. Default: BASE_FEE
124
+ */
125
+ fee?: number;
126
+ /**
127
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
128
+ */
129
+ timeoutInSeconds?: number;
130
+ /**
131
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
132
+ */
133
+ simulate?: boolean;
134
+ }) => Promise<AssembledTransaction<i128>>;
135
+ /**
136
+ * 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.
137
+ * Burn `amount` from `from`.
138
+ *
139
+ * Reduces from's balance by the amount, without transferring the balance
140
+ * to another holder's balance.
141
+ *
142
+ * # Arguments
143
+ *
144
+ * * `from` - The address holding the balance of tokens which will be
145
+ * burned from.
146
+ * * `amount` - The amount of tokens to be burned.
147
+ *
148
+ * # Events
149
+ *
150
+ * Emits an event with topics `["burn", from: Address], data = [amount:
151
+ * i128]`
152
+ */
153
+ burn: ({ from, amount }: {
154
+ from: string;
155
+ amount: i128;
156
+ }, options?: {
157
+ /**
158
+ * The fee to pay for the transaction. Default: BASE_FEE
159
+ */
160
+ fee?: number;
161
+ /**
162
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
163
+ */
164
+ timeoutInSeconds?: number;
165
+ /**
166
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
167
+ */
168
+ simulate?: boolean;
169
+ }) => Promise<AssembledTransaction<null>>;
170
+ /**
171
+ * 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.
172
+ * Burn `amount` from `from`, consuming the allowance of `spender`.
173
+ *
174
+ * Reduces from's balance by the amount, without transferring the balance
175
+ * to another holder's balance.
176
+ *
177
+ * The spender will be allowed to burn the amount from from's balance, if
178
+ * the amount is less than or equal to the allowance that the spender has
179
+ * on the from's balance. The spender's allowance on from's balance will be
180
+ * reduced by the amount.
181
+ *
182
+ * # Arguments
183
+ *
184
+ * * `spender` - The address authorizing the burn, and having its allowance
185
+ * consumed during the burn.
186
+ * * `from` - The address holding the balance of tokens which will be
187
+ * burned from.
188
+ * * `amount` - The amount of tokens to be burned.
189
+ *
190
+ * # Events
191
+ *
192
+ * Emits an event with topics `["burn", from: Address], data = [amount:
193
+ * i128]`
194
+ */
195
+ burn_from: ({ spender, from, amount }: {
196
+ spender: string;
197
+ from: string;
198
+ amount: i128;
199
+ }, options?: {
200
+ /**
201
+ * The fee to pay for the transaction. Default: BASE_FEE
202
+ */
203
+ fee?: number;
204
+ /**
205
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
206
+ */
207
+ timeoutInSeconds?: number;
208
+ /**
209
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
210
+ */
211
+ simulate?: boolean;
212
+ }) => Promise<AssembledTransaction<null>>;
213
+ /**
214
+ * 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.
215
+ * Clawback `amount` from `from` account. `amount` is burned in the
216
+ * clawback process.
217
+ *
218
+ * # Arguments
219
+ *
220
+ * * `from` - The address holding the balance from which the clawback will
221
+ * take tokens.
222
+ * * `amount` - The amount of tokens to be clawed back.
223
+ *
224
+ * # Events
225
+ *
226
+ * Emits an event with topics `["clawback", admin: Address, to: Address],
227
+ * data = [amount: i128]`
228
+ */
229
+ clawback: ({ from, amount }: {
230
+ from: string;
231
+ amount: i128;
232
+ }, options?: {
233
+ /**
234
+ * The fee to pay for the transaction. Default: BASE_FEE
235
+ */
236
+ fee?: number;
237
+ /**
238
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
239
+ */
240
+ timeoutInSeconds?: number;
241
+ /**
242
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
243
+ */
244
+ simulate?: boolean;
245
+ }) => Promise<AssembledTransaction<null>>;
246
+ /**
247
+ * 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.
248
+ * Returns the number of decimals used to represent amounts of this token.
249
+ *
250
+ * # Panics
251
+ *
252
+ * If the contract has not yet been initialized.
253
+ */
254
+ decimals: (options?: {
255
+ /**
256
+ * The fee to pay for the transaction. Default: BASE_FEE
257
+ */
258
+ fee?: number;
259
+ /**
260
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
261
+ */
262
+ timeoutInSeconds?: number;
263
+ /**
264
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
265
+ */
266
+ simulate?: boolean;
267
+ }) => Promise<AssembledTransaction<u32>>;
268
+ /**
269
+ * 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.
270
+ * Mints `amount` to `to`.
271
+ *
272
+ * # Arguments
273
+ *
274
+ * * `to` - The address which will receive the minted tokens.
275
+ * * `amount` - The amount of tokens to be minted.
276
+ *
277
+ * # Events
278
+ *
279
+ * Emits an event with topics `["mint", admin: Address, to: Address], data
280
+ * = [amount: i128]`
281
+ */
282
+ mint: ({ to, amount }: {
283
+ to: string;
284
+ amount: i128;
285
+ }, options?: {
286
+ /**
287
+ * The fee to pay for the transaction. Default: BASE_FEE
288
+ */
289
+ fee?: number;
290
+ /**
291
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
292
+ */
293
+ timeoutInSeconds?: number;
294
+ /**
295
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
296
+ */
297
+ simulate?: boolean;
298
+ }) => Promise<AssembledTransaction<null>>;
299
+ /**
300
+ * 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.
301
+ * Returns the name for this token.
302
+ *
303
+ * # Panics
304
+ *
305
+ * If the contract has not yet been initialized.
306
+ */
307
+ name: (options?: {
308
+ /**
309
+ * The fee to pay for the transaction. Default: BASE_FEE
310
+ */
311
+ fee?: number;
312
+ /**
313
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
314
+ */
315
+ timeoutInSeconds?: number;
316
+ /**
317
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
318
+ */
319
+ simulate?: boolean;
320
+ }) => Promise<AssembledTransaction<string>>;
321
+ /**
322
+ * 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.
323
+ * Sets the administrator to the specified address `new_admin`.
324
+ *
325
+ * # Arguments
326
+ *
327
+ * * `new_admin` - The address which will henceforth be the administrator
328
+ * of this token contract.
329
+ *
330
+ * # Events
331
+ *
332
+ * Emits an event with topics `["set_admin", admin: Address], data =
333
+ * [new_admin: Address]`
334
+ */
335
+ set_admin: ({ new_admin }: {
336
+ new_admin: string;
337
+ }, options?: {
338
+ /**
339
+ * The fee to pay for the transaction. Default: BASE_FEE
340
+ */
341
+ fee?: number;
342
+ /**
343
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
344
+ */
345
+ timeoutInSeconds?: number;
346
+ /**
347
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
348
+ */
349
+ simulate?: boolean;
350
+ }) => Promise<AssembledTransaction<null>>;
351
+ /**
352
+ * 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.
353
+ * Returns the admin of the contract.
354
+ *
355
+ * # Panics
356
+ *
357
+ * If the admin is not set.
358
+ */
359
+ admin: (options?: {
360
+ /**
361
+ * The fee to pay for the transaction. Default: BASE_FEE
362
+ */
363
+ fee?: number;
364
+ /**
365
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
366
+ */
367
+ timeoutInSeconds?: number;
368
+ /**
369
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
370
+ */
371
+ simulate?: boolean;
372
+ }) => Promise<AssembledTransaction<string>>;
373
+ /**
374
+ * 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.
375
+ * Sets whether the account is authorized to use its balance. If
376
+ * `authorized` is true, `id` should be able to use its balance.
377
+ *
378
+ * # Arguments
379
+ *
380
+ * * `id` - The address being (de-)authorized.
381
+ * * `authorize` - Whether or not `id` can use its balance.
382
+ *
383
+ * # Events
384
+ *
385
+ * Emits an event with topics `["set_authorized", id: Address], data =
386
+ * [authorize: bool]`
387
+ */
388
+ set_authorized: ({ id, authorize }: {
389
+ id: string;
390
+ authorize: boolean;
391
+ }, options?: {
392
+ /**
393
+ * The fee to pay for the transaction. Default: BASE_FEE
394
+ */
395
+ fee?: number;
396
+ /**
397
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
398
+ */
399
+ timeoutInSeconds?: number;
400
+ /**
401
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
402
+ */
403
+ simulate?: boolean;
404
+ }) => Promise<AssembledTransaction<null>>;
405
+ /**
406
+ * 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.
407
+ * Returns the symbol for this token.
408
+ *
409
+ * # Panics
410
+ *
411
+ * If the contract has not yet been initialized.
412
+ */
413
+ symbol: (options?: {
414
+ /**
415
+ * The fee to pay for the transaction. Default: BASE_FEE
416
+ */
417
+ fee?: number;
418
+ /**
419
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
420
+ */
421
+ timeoutInSeconds?: number;
422
+ /**
423
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
424
+ */
425
+ simulate?: boolean;
426
+ }) => Promise<AssembledTransaction<string>>;
427
+ /**
428
+ * 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.
429
+ * Transfer `amount` from `from` to `to`.
430
+ *
431
+ * # Arguments
432
+ *
433
+ * * `from` - The address holding the balance of tokens which will be
434
+ * withdrawn from.
435
+ * * `to` - The address which will receive the transferred tokens.
436
+ * * `amount` - The amount of tokens to be transferred.
437
+ *
438
+ * # Events
439
+ *
440
+ * Emits an event with topics `["transfer", from: Address, to: Address],
441
+ * data = [amount: i128]`
442
+ */
443
+ transfer: ({ from, to, amount }: {
444
+ from: string;
445
+ to: string;
446
+ amount: i128;
447
+ }, options?: {
448
+ /**
449
+ * The fee to pay for the transaction. Default: BASE_FEE
450
+ */
451
+ fee?: number;
452
+ /**
453
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
454
+ */
455
+ timeoutInSeconds?: number;
456
+ /**
457
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
458
+ */
459
+ simulate?: boolean;
460
+ }) => Promise<AssembledTransaction<null>>;
461
+ /**
462
+ * 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.
463
+ * Transfer `amount` from `from` to `to`, consuming the allowance that
464
+ * `spender` has on `from`'s balance. Authorized by spender
465
+ * (`spender.require_auth()`).
466
+ *
467
+ * The spender will be allowed to transfer the amount from from's balance
468
+ * if the amount is less than or equal to the allowance that the spender
469
+ * has on the from's balance. The spender's allowance on from's balance
470
+ * will be reduced by the amount.
471
+ *
472
+ * # Arguments
473
+ *
474
+ * * `spender` - The address authorizing the transfer, and having its
475
+ * allowance consumed during the transfer.
476
+ * * `from` - The address holding the balance of tokens which will be
477
+ * withdrawn from.
478
+ * * `to` - The address which will receive the transferred tokens.
479
+ * * `amount` - The amount of tokens to be transferred.
480
+ *
481
+ * # Events
482
+ *
483
+ * Emits an event with topics `["transfer", from: Address, to: Address],
484
+ * data = [amount: i128]`
485
+ */
486
+ transfer_from: ({ spender, from, to, amount }: {
487
+ spender: string;
488
+ from: string;
489
+ to: string;
490
+ amount: i128;
491
+ }, options?: {
492
+ /**
493
+ * The fee to pay for the transaction. Default: BASE_FEE
494
+ */
495
+ fee?: number;
496
+ /**
497
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
498
+ */
499
+ timeoutInSeconds?: number;
500
+ /**
501
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
502
+ */
503
+ simulate?: boolean;
504
+ }) => Promise<AssembledTransaction<null>>;
505
+ }
506
+ export declare class Client extends ContractClient {
507
+ readonly options: ContractClientOptions;
508
+ constructor(options: ContractClientOptions);
509
+ readonly fromJSON: {
510
+ allowance: (json: string) => AssembledTransaction<bigint>;
511
+ authorized: (json: string) => AssembledTransaction<boolean>;
512
+ approve: (json: string) => AssembledTransaction<null>;
513
+ balance: (json: string) => AssembledTransaction<bigint>;
514
+ burn: (json: string) => AssembledTransaction<null>;
515
+ burn_from: (json: string) => AssembledTransaction<null>;
516
+ clawback: (json: string) => AssembledTransaction<null>;
517
+ decimals: (json: string) => AssembledTransaction<number>;
518
+ mint: (json: string) => AssembledTransaction<null>;
519
+ name: (json: string) => AssembledTransaction<string>;
520
+ set_admin: (json: string) => AssembledTransaction<null>;
521
+ admin: (json: string) => AssembledTransaction<string>;
522
+ set_authorized: (json: string) => AssembledTransaction<null>;
523
+ symbol: (json: string) => AssembledTransaction<string>;
524
+ transfer: (json: string) => AssembledTransaction<null>;
525
+ transfer_from: (json: string) => AssembledTransaction<null>;
526
+ };
527
+ }
@@ -1,2 +1,3 @@
1
1
  packages:
2
- - 'packages/*'
2
+ - 'packages/**'
3
+ - '!demo/**'