@huma-finance/soroban-sep41 0.0.11-beta.17

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/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # underlyingToken JS
2
+
3
+ JS library for interacting with [Soroban](https://soroban.stellar.org/) smart contract `underlyingToken` via Soroban RPC.
4
+
5
+ This library was automatically generated by Soroban CLI using a command similar to:
6
+
7
+ ```bash
8
+ soroban contract bindings ts \
9
+ --rpc-url https://soroban-testnet.stellar.org \
10
+ --network-passphrase "Test SDF Network ; September 2015" \
11
+ --contract-id CBHVVFYF3LZA7JUUBF3KK5SUQ3NWWT2MNCKJPZW6KVV7O7ZMPALFOPHR \
12
+ --output-dir ./path/to/underlyingToken
13
+ ```
14
+
15
+ The network passphrase and contract ID are exported from [index.ts](./src/index.ts) in the `networks` constant. If you are the one who generated this library and you know that this contract is also deployed to other networks, feel free to update `networks` with other valid options. This will help your contract consumers use this library more easily.
16
+
17
+ # To publish or not to publish
18
+
19
+ This library is suitable for publishing to NPM. You can publish it to NPM using the `npm publish` command.
20
+
21
+ But you don't need to publish this library to NPM to use it. You can add it to your project's `package.json` using a file path:
22
+
23
+ ```json
24
+ "dependencies": {
25
+ "underlyingToken": "./path/to/this/folder"
26
+ }
27
+ ```
28
+
29
+ However, we've actually encountered [frustration](https://github.com/stellar/soroban-example-dapp/pull/117#discussion_r1232873560) using local libraries with NPM in this way. Though it seems a bit messy, we suggest generating the library directly to your `node_modules` folder automatically after each install by using a `postinstall` script. We've had the least trouble with this approach. NPM will automatically remove what it sees as erroneous directories during the `install` step, and then regenerate them when it gets to your `postinstall` step, which will keep the library up-to-date with your contract.
30
+
31
+ ```json
32
+ "scripts": {
33
+ "postinstall": "soroban contract bindings ts --rpc-url https://soroban-testnet.stellar.org --network-passphrase \"Test SDF Network ; September 2015\" --id CBHVVFYF3LZA7JUUBF3KK5SUQ3NWWT2MNCKJPZW6KVV7O7ZMPALFOPHR --name underlyingToken"
34
+ }
35
+ ```
36
+
37
+ Obviously you need to adjust the above command based on the actual command you used to generate the library.
38
+
39
+ # Use it
40
+
41
+ Now that you have your library up-to-date and added to your project, you can import it in a file and see inline documentation for all of its exported methods:
42
+
43
+ ```js
44
+ import { Contract, networks } from "underlyingToken"
45
+
46
+ const contract = new Contract({
47
+ ...networks.futurenet, // for example; check which networks this library exports
48
+ rpcUrl: '...', // use your own, or find one for testing at https://soroban.stellar.org/docs/reference/rpc#public-rpc-providers
49
+ })
50
+
51
+ contract.|
52
+ ```
53
+
54
+ As long as your editor is configured to show JavaScript/TypeScript documentation, you can pause your typing at that `|` to get a list of all exports and inline-documentation for each. It exports a separate [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) function for each method in the smart contract, with documentation for each generated from the comments the contract's author included in the original source code.
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "version": "0.0.11-beta.17+b42c649",
3
+ "name": "@huma-finance/soroban-sep41",
4
+ "dependencies": {
5
+ "@stellar/freighter-api": "2.0.0",
6
+ "@stellar/stellar-sdk": "11.3.0",
7
+ "buffer": "6.0.3"
8
+ },
9
+ "scripts": {
10
+ "build": "node ./scripts/build.mjs"
11
+ },
12
+ "exports": {
13
+ "require": "./dist/cjs/index.js",
14
+ "import": "./dist/esm/index.js"
15
+ },
16
+ "typings": "dist/types/index.d.ts",
17
+ "devDependencies": {
18
+ "typescript": "5.3.3"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "registry": "https://registry.npmjs.org/"
23
+ },
24
+ "gitHead": "b42c649f26b5207b2f5e12767d63cc9e5ead0faa"
25
+ }
@@ -0,0 +1,37 @@
1
+ import { spawnSync } from "node:child_process"
2
+ import fs from "node:fs"
3
+ import path from "node:path"
4
+
5
+ const buildDir = "./dist"
6
+
7
+ const { error, stderr } = spawnSync("tsc", ["-b", "./scripts/tsconfig.cjs.json", "./scripts/tsconfig.esm.json", "./scripts/tsconfig.types.json"], { stdio: "inherit" })
8
+
9
+ if (error) {
10
+ console.error(stderr)
11
+ console.error(error)
12
+ throw error
13
+ }
14
+
15
+ function createEsmModulePackageJson() {
16
+ fs.readdir(buildDir, function (err, dirs) {
17
+ if (err) {
18
+ throw err
19
+ }
20
+ dirs.forEach(function (dir) {
21
+ if (dir === "esm") {
22
+ // 1. add package.json file with "type": "module"
23
+ var packageJsonFile = path.join(buildDir, dir, "/package.json")
24
+ if (!fs.existsSync(packageJsonFile)) {
25
+ fs.writeFileSync(
26
+ packageJsonFile,
27
+ '{"type": "module"}',
28
+ 'utf8',
29
+ err => { if (err) throw err }
30
+ )
31
+ }
32
+ }
33
+ })
34
+ })
35
+ }
36
+
37
+ createEsmModulePackageJson()
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../dist/cjs",
5
+ "module": "commonjs"
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../dist/esm",
5
+ "module": "esnext"
6
+ }
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../dist/types",
5
+ "declaration": true,
6
+ "emitDeclarationOnly": true
7
+ }
8
+ }
package/src/index.ts ADDED
@@ -0,0 +1,421 @@
1
+ import { ContractSpec, Address } from "@stellar/stellar-sdk";
2
+ import { Buffer } from "buffer";
3
+ import {
4
+ AssembledTransaction,
5
+ ContractClient,
6
+ ContractClientOptions,
7
+ } from "@stellar/stellar-sdk/lib/contract_client/index.js";
8
+ import type {
9
+ u32,
10
+ i32,
11
+ u64,
12
+ i64,
13
+ u128,
14
+ i128,
15
+ u256,
16
+ i256,
17
+ Option,
18
+ Typepoint,
19
+ Duration,
20
+ } from "@stellar/stellar-sdk/lib/contract_client";
21
+ import { Result } from "@stellar/stellar-sdk/lib/rust_types/index.js";
22
+ export * from "@stellar/stellar-sdk";
23
+ export * from "@stellar/stellar-sdk/lib/contract_client/index.js";
24
+ export * from "@stellar/stellar-sdk/lib/rust_types/index.js";
25
+
26
+ if (typeof window !== "undefined") {
27
+ //@ts-ignore Buffer exists
28
+ window.Buffer = window.Buffer || Buffer;
29
+ }
30
+
31
+ export const networks = {
32
+ testnet: {
33
+ networkPassphrase: "Test SDF Network ; September 2015",
34
+ contractId: "CBHVVFYF3LZA7JUUBF3KK5SUQ3NWWT2MNCKJPZW6KVV7O7ZMPALFOPHR",
35
+ },
36
+ } as const;
37
+
38
+ /**
39
+ * The error codes for the contract.
40
+ */
41
+ export const Errors = {
42
+ 1: { message: "" },
43
+ 2: { message: "" },
44
+ 3: { message: "" },
45
+ 4: { message: "" },
46
+ 8: { message: "" },
47
+ 9: { message: "" },
48
+ 10: { message: "" },
49
+ 12: { message: "" },
50
+ };
51
+
52
+ export interface TokenMetadata {
53
+ decimal: u32;
54
+ name: string;
55
+ symbol: string;
56
+ }
57
+
58
+ export interface AllowanceDataKey {
59
+ from: string;
60
+ spender: string;
61
+ }
62
+
63
+ export interface AllowanceValue {
64
+ amount: i128;
65
+ expiration_ledger: u32;
66
+ }
67
+
68
+ export type DataKey =
69
+ | { tag: "Allowance"; values: readonly [AllowanceDataKey] }
70
+ | { tag: "Balance"; values: readonly [string] }
71
+ | { tag: "Nonce"; values: readonly [string] }
72
+ | { tag: "State"; values: readonly [string] };
73
+
74
+ export interface Client {
75
+ /**
76
+ * Construct and simulate a initialize 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
+ */
78
+ initialize: (
79
+ {
80
+ admin,
81
+ decimal,
82
+ name,
83
+ symbol,
84
+ }: { admin: string; decimal: u32; name: string; symbol: string },
85
+ options?: {
86
+ /**
87
+ * The fee to pay for the transaction. Default: BASE_FEE
88
+ */
89
+ fee?: number;
90
+
91
+ /**
92
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
93
+ */
94
+ timeoutInSeconds?: number;
95
+
96
+ /**
97
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
98
+ */
99
+ simulate?: boolean;
100
+ }
101
+ ) => Promise<AssembledTransaction<null>>;
102
+
103
+ /**
104
+ * 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.
105
+ */
106
+ mint: (
107
+ { to, amount }: { to: string; amount: i128 },
108
+ options?: {
109
+ /**
110
+ * The fee to pay for the transaction. Default: BASE_FEE
111
+ */
112
+ fee?: number;
113
+
114
+ /**
115
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
116
+ */
117
+ timeoutInSeconds?: number;
118
+
119
+ /**
120
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
121
+ */
122
+ simulate?: boolean;
123
+ }
124
+ ) => Promise<AssembledTransaction<null>>;
125
+
126
+ /**
127
+ * 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.
128
+ */
129
+ set_admin: (
130
+ { new_admin }: { new_admin: string },
131
+ options?: {
132
+ /**
133
+ * The fee to pay for the transaction. Default: BASE_FEE
134
+ */
135
+ fee?: number;
136
+
137
+ /**
138
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
139
+ */
140
+ timeoutInSeconds?: number;
141
+
142
+ /**
143
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
144
+ */
145
+ simulate?: boolean;
146
+ }
147
+ ) => Promise<AssembledTransaction<null>>;
148
+
149
+ /**
150
+ * 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.
151
+ */
152
+ allowance: (
153
+ { from, spender }: { from: string; spender: string },
154
+ options?: {
155
+ /**
156
+ * The fee to pay for the transaction. Default: BASE_FEE
157
+ */
158
+ fee?: number;
159
+
160
+ /**
161
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
162
+ */
163
+ timeoutInSeconds?: number;
164
+
165
+ /**
166
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
167
+ */
168
+ simulate?: boolean;
169
+ }
170
+ ) => Promise<AssembledTransaction<i128>>;
171
+
172
+ /**
173
+ * 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.
174
+ */
175
+ approve: (
176
+ {
177
+ from,
178
+ spender,
179
+ amount,
180
+ expiration_ledger,
181
+ }: { from: string; spender: string; amount: i128; expiration_ledger: u32 },
182
+ options?: {
183
+ /**
184
+ * The fee to pay for the transaction. Default: BASE_FEE
185
+ */
186
+ fee?: number;
187
+
188
+ /**
189
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
190
+ */
191
+ timeoutInSeconds?: number;
192
+
193
+ /**
194
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
195
+ */
196
+ simulate?: boolean;
197
+ }
198
+ ) => Promise<AssembledTransaction<null>>;
199
+
200
+ /**
201
+ * 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.
202
+ */
203
+ balance: (
204
+ { id }: { id: string },
205
+ options?: {
206
+ /**
207
+ * The fee to pay for the transaction. Default: BASE_FEE
208
+ */
209
+ fee?: number;
210
+
211
+ /**
212
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
213
+ */
214
+ timeoutInSeconds?: number;
215
+
216
+ /**
217
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
218
+ */
219
+ simulate?: boolean;
220
+ }
221
+ ) => Promise<AssembledTransaction<i128>>;
222
+
223
+ /**
224
+ * 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.
225
+ */
226
+ transfer: (
227
+ { from, to, amount }: { from: string; to: string; amount: i128 },
228
+ options?: {
229
+ /**
230
+ * The fee to pay for the transaction. Default: BASE_FEE
231
+ */
232
+ fee?: number;
233
+
234
+ /**
235
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
236
+ */
237
+ timeoutInSeconds?: number;
238
+
239
+ /**
240
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
241
+ */
242
+ simulate?: boolean;
243
+ }
244
+ ) => Promise<AssembledTransaction<null>>;
245
+
246
+ /**
247
+ * 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.
248
+ */
249
+ transfer_from: (
250
+ {
251
+ spender,
252
+ from,
253
+ to,
254
+ amount,
255
+ }: { spender: string; from: string; to: string; amount: i128 },
256
+ options?: {
257
+ /**
258
+ * The fee to pay for the transaction. Default: BASE_FEE
259
+ */
260
+ fee?: number;
261
+
262
+ /**
263
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
264
+ */
265
+ timeoutInSeconds?: number;
266
+
267
+ /**
268
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
269
+ */
270
+ simulate?: boolean;
271
+ }
272
+ ) => Promise<AssembledTransaction<null>>;
273
+
274
+ /**
275
+ * 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.
276
+ */
277
+ burn: (
278
+ { from, amount }: { from: string; amount: i128 },
279
+ options?: {
280
+ /**
281
+ * The fee to pay for the transaction. Default: BASE_FEE
282
+ */
283
+ fee?: number;
284
+
285
+ /**
286
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
287
+ */
288
+ timeoutInSeconds?: number;
289
+
290
+ /**
291
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
292
+ */
293
+ simulate?: boolean;
294
+ }
295
+ ) => Promise<AssembledTransaction<null>>;
296
+
297
+ /**
298
+ * 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.
299
+ */
300
+ burn_from: (
301
+ { spender, from, amount }: { spender: string; from: string; amount: i128 },
302
+ options?: {
303
+ /**
304
+ * The fee to pay for the transaction. Default: BASE_FEE
305
+ */
306
+ fee?: number;
307
+
308
+ /**
309
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
310
+ */
311
+ timeoutInSeconds?: number;
312
+
313
+ /**
314
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
315
+ */
316
+ simulate?: boolean;
317
+ }
318
+ ) => Promise<AssembledTransaction<null>>;
319
+
320
+ /**
321
+ * 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.
322
+ */
323
+ decimals: (options?: {
324
+ /**
325
+ * The fee to pay for the transaction. Default: BASE_FEE
326
+ */
327
+ fee?: number;
328
+
329
+ /**
330
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
331
+ */
332
+ timeoutInSeconds?: number;
333
+
334
+ /**
335
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
336
+ */
337
+ simulate?: boolean;
338
+ }) => Promise<AssembledTransaction<u32>>;
339
+
340
+ /**
341
+ * 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.
342
+ */
343
+ name: (options?: {
344
+ /**
345
+ * The fee to pay for the transaction. Default: BASE_FEE
346
+ */
347
+ fee?: number;
348
+
349
+ /**
350
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
351
+ */
352
+ timeoutInSeconds?: number;
353
+
354
+ /**
355
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
356
+ */
357
+ simulate?: boolean;
358
+ }) => Promise<AssembledTransaction<string>>;
359
+
360
+ /**
361
+ * 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.
362
+ */
363
+ symbol: (options?: {
364
+ /**
365
+ * The fee to pay for the transaction. Default: BASE_FEE
366
+ */
367
+ fee?: number;
368
+
369
+ /**
370
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
371
+ */
372
+ timeoutInSeconds?: number;
373
+
374
+ /**
375
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
376
+ */
377
+ simulate?: boolean;
378
+ }) => Promise<AssembledTransaction<string>>;
379
+ }
380
+ export class Client extends ContractClient {
381
+ constructor(public readonly options: ContractClientOptions) {
382
+ super(
383
+ new ContractSpec([
384
+ "AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAABAAAAAAAAAAFYWRtaW4AAAAAAAATAAAAAAAAAAdkZWNpbWFsAAAAAAQAAAAAAAAABG5hbWUAAAAQAAAAAAAAAAZzeW1ib2wAAAAAABAAAAAA",
385
+ "AAAAAAAAAAAAAAAEbWludAAAAAIAAAAAAAAAAnRvAAAAAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAA",
386
+ "AAAAAAAAAAAAAAAJc2V0X2FkbWluAAAAAAAAAQAAAAAAAAAJbmV3X2FkbWluAAAAAAAAEwAAAAA=",
387
+ "AAAAAAAAAAAAAAAJYWxsb3dhbmNlAAAAAAAAAgAAAAAAAAAEZnJvbQAAABMAAAAAAAAAB3NwZW5kZXIAAAAAEwAAAAEAAAAL",
388
+ "AAAAAAAAAAAAAAAHYXBwcm92ZQAAAAAEAAAAAAAAAARmcm9tAAAAEwAAAAAAAAAHc3BlbmRlcgAAAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAEWV4cGlyYXRpb25fbGVkZ2VyAAAAAAAABAAAAAA=",
389
+ "AAAAAAAAAAAAAAAHYmFsYW5jZQAAAAABAAAAAAAAAAJpZAAAAAAAEwAAAAEAAAAL",
390
+ "AAAAAAAAAAAAAAAIdHJhbnNmZXIAAAADAAAAAAAAAARmcm9tAAAAEwAAAAAAAAACdG8AAAAAABMAAAAAAAAABmFtb3VudAAAAAAACwAAAAA=",
391
+ "AAAAAAAAAAAAAAANdHJhbnNmZXJfZnJvbQAAAAAAAAQAAAAAAAAAB3NwZW5kZXIAAAAAEwAAAAAAAAAEZnJvbQAAABMAAAAAAAAAAnRvAAAAAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAA",
392
+ "AAAAAAAAAAAAAAAEYnVybgAAAAIAAAAAAAAABGZyb20AAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAA",
393
+ "AAAAAAAAAAAAAAAJYnVybl9mcm9tAAAAAAAAAwAAAAAAAAAHc3BlbmRlcgAAAAATAAAAAAAAAARmcm9tAAAAEwAAAAAAAAAGYW1vdW50AAAAAAALAAAAAA==",
394
+ "AAAAAAAAAAAAAAAIZGVjaW1hbHMAAAAAAAAAAQAAAAQ=",
395
+ "AAAAAAAAAAAAAAAEbmFtZQAAAAAAAAABAAAAEA==",
396
+ "AAAAAAAAAAAAAAAGc3ltYm9sAAAAAAAAAAAAAQAAABA=",
397
+ "AAAABAAAACFUaGUgZXJyb3IgY29kZXMgZm9yIHRoZSBjb250cmFjdC4AAAAAAAAAAAAAClRva2VuRXJyb3IAAAAAAAgAAAAAAAAADUludGVybmFsRXJyb3IAAAAAAAABAAAAAAAAABpPcGVyYXRpb25Ob3RTdXBwb3J0ZWRFcnJvcgAAAAAAAgAAAAAAAAAXQWxyZWFkeUluaXRpYWxpemVkRXJyb3IAAAAAAwAAAAAAAAARVW5hdXRob3JpemVkRXJyb3IAAAAAAAAEAAAAAAAAABNOZWdhdGl2ZUFtb3VudEVycm9yAAAAAAgAAAAAAAAADkFsbG93YW5jZUVycm9yAAAAAAAJAAAAAAAAAAxCYWxhbmNlRXJyb3IAAAAKAAAAAAAAAA1PdmVyZmxvd0Vycm9yAAAAAAAADA==",
398
+ "AAAAAQAAAAAAAAAAAAAADVRva2VuTWV0YWRhdGEAAAAAAAADAAAAAAAAAAdkZWNpbWFsAAAAAAQAAAAAAAAABG5hbWUAAAAQAAAAAAAAAAZzeW1ib2wAAAAAABA=",
399
+ "AAAAAQAAAAAAAAAAAAAAEEFsbG93YW5jZURhdGFLZXkAAAACAAAAAAAAAARmcm9tAAAAEwAAAAAAAAAHc3BlbmRlcgAAAAAT",
400
+ "AAAAAQAAAAAAAAAAAAAADkFsbG93YW5jZVZhbHVlAAAAAAACAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAEWV4cGlyYXRpb25fbGVkZ2VyAAAAAAAABA==",
401
+ "AAAAAgAAAAAAAAAAAAAAB0RhdGFLZXkAAAAABAAAAAEAAAAAAAAACUFsbG93YW5jZQAAAAAAAAEAAAfQAAAAEEFsbG93YW5jZURhdGFLZXkAAAABAAAAAAAAAAdCYWxhbmNlAAAAAAEAAAATAAAAAQAAAAAAAAAFTm9uY2UAAAAAAAABAAAAEwAAAAEAAAAAAAAABVN0YXRlAAAAAAAAAQAAABM=",
402
+ ]),
403
+ options
404
+ );
405
+ }
406
+ public readonly fromJSON = {
407
+ initialize: this.txFromJSON<null>,
408
+ mint: this.txFromJSON<null>,
409
+ set_admin: this.txFromJSON<null>,
410
+ allowance: this.txFromJSON<i128>,
411
+ approve: this.txFromJSON<null>,
412
+ balance: this.txFromJSON<i128>,
413
+ transfer: this.txFromJSON<null>,
414
+ transfer_from: this.txFromJSON<null>,
415
+ burn: this.txFromJSON<null>,
416
+ burn_from: this.txFromJSON<null>,
417
+ decimals: this.txFromJSON<u32>,
418
+ name: this.txFromJSON<string>,
419
+ symbol: this.txFromJSON<string>,
420
+ };
421
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "include": ["src/**/*"],
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "rootDir": "./src",
8
+ "outDir": "dist",
9
+ "moduleResolution": "node",
10
+ "declaration": true,
11
+ "strictNullChecks": true,
12
+ "skipLibCheck": true
13
+ }
14
+ }