@ar.io/sdk 3.9.0-alpha.1 → 3.9.0-alpha.3
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/bundles/web.bundle.min.js +29 -29
- package/lib/cjs/cli/options.js +5 -0
- package/lib/cjs/cli/utils.js +1 -0
- package/lib/cjs/utils/ao.js +4 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/options.js +5 -0
- package/lib/esm/cli/utils.js +1 -0
- package/lib/esm/utils/ao.js +3 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/options.d.ts +4 -0
- package/lib/types/cli/types.d.ts +1 -0
- package/lib/types/types/io.d.ts +1 -0
- package/lib/types/utils/ao.d.ts +3 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/cli/options.js
CHANGED
|
@@ -268,6 +268,10 @@ exports.optionMap = {
|
|
|
268
268
|
alias: '--recipient <recipient>',
|
|
269
269
|
description: 'The recipient to interact with',
|
|
270
270
|
},
|
|
271
|
+
logo: {
|
|
272
|
+
alias: '--logo <logo>',
|
|
273
|
+
description: 'The ANT logo',
|
|
274
|
+
},
|
|
271
275
|
};
|
|
272
276
|
exports.walletOptions = [
|
|
273
277
|
exports.optionMap.walletFile,
|
|
@@ -369,6 +373,7 @@ exports.antStateOptions = [
|
|
|
369
373
|
exports.optionMap.description,
|
|
370
374
|
exports.optionMap.controllers,
|
|
371
375
|
exports.optionMap.ttlSeconds,
|
|
376
|
+
exports.optionMap.logo,
|
|
372
377
|
];
|
|
373
378
|
exports.setAntBaseNameOptions = [
|
|
374
379
|
exports.optionMap.processId,
|
package/lib/cjs/cli/utils.js
CHANGED
|
@@ -434,6 +434,7 @@ function getANTStateFromOptions(options) {
|
|
|
434
434
|
ticker: options.ticker,
|
|
435
435
|
name: options.name,
|
|
436
436
|
keywords: options.keywords,
|
|
437
|
+
logo: options.logo,
|
|
437
438
|
ttlSeconds: options.ttlSeconds !== undefined
|
|
438
439
|
? +options.ttlSeconds
|
|
439
440
|
: exports.defaultTtlSecondsCLI,
|
package/lib/cjs/utils/ao.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeUnicodeFromError = exports.errorMessageFromOutput = exports.parseAoEpochData = exports.initANTStateForAddress = exports.defaultTargetManifestId = exports.createAoSigner = exports.isAoSigner = exports.evolveANT = exports.spawnANT = void 0;
|
|
3
|
+
exports.removeUnicodeFromError = exports.errorMessageFromOutput = exports.parseAoEpochData = exports.initANTStateForAddress = exports.defaultANTLogoId = exports.defaultTargetManifestId = exports.createAoSigner = exports.isAoSigner = exports.evolveANT = exports.spawnANT = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
6
6
|
*
|
|
@@ -141,7 +141,8 @@ function createAoSigner(signer) {
|
|
|
141
141
|
}
|
|
142
142
|
exports.createAoSigner = createAoSigner;
|
|
143
143
|
exports.defaultTargetManifestId = '-k7t8xMoB8hW482609Z9F4bTFMC3MnuW8bTvTyT8pFI';
|
|
144
|
-
|
|
144
|
+
exports.defaultANTLogoId = 'Sie_26dvgyok0PZD_-iQAFOhOd5YxDTkczOLoqTTL_A';
|
|
145
|
+
function initANTStateForAddress({ owner, targetId, ttlSeconds = 3600, keywords = [], controllers = [], description = '', ticker = 'aos', name = 'ANT', logo = exports.defaultANTLogoId, }) {
|
|
145
146
|
return {
|
|
146
147
|
ticker,
|
|
147
148
|
name,
|
|
@@ -156,6 +157,7 @@ function initANTStateForAddress({ owner, targetId, ttlSeconds = 3600, keywords =
|
|
|
156
157
|
ttlSeconds,
|
|
157
158
|
},
|
|
158
159
|
},
|
|
160
|
+
logo,
|
|
159
161
|
};
|
|
160
162
|
}
|
|
161
163
|
exports.initANTStateForAddress = initANTStateForAddress;
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/cli/options.js
CHANGED
|
@@ -265,6 +265,10 @@ export const optionMap = {
|
|
|
265
265
|
alias: '--recipient <recipient>',
|
|
266
266
|
description: 'The recipient to interact with',
|
|
267
267
|
},
|
|
268
|
+
logo: {
|
|
269
|
+
alias: '--logo <logo>',
|
|
270
|
+
description: 'The ANT logo',
|
|
271
|
+
},
|
|
268
272
|
};
|
|
269
273
|
export const walletOptions = [
|
|
270
274
|
optionMap.walletFile,
|
|
@@ -366,6 +370,7 @@ export const antStateOptions = [
|
|
|
366
370
|
optionMap.description,
|
|
367
371
|
optionMap.controllers,
|
|
368
372
|
optionMap.ttlSeconds,
|
|
373
|
+
optionMap.logo,
|
|
369
374
|
];
|
|
370
375
|
export const setAntBaseNameOptions = [
|
|
371
376
|
optionMap.processId,
|
package/lib/esm/cli/utils.js
CHANGED
|
@@ -391,6 +391,7 @@ export function getANTStateFromOptions(options) {
|
|
|
391
391
|
ticker: options.ticker,
|
|
392
392
|
name: options.name,
|
|
393
393
|
keywords: options.keywords,
|
|
394
|
+
logo: options.logo,
|
|
394
395
|
ttlSeconds: options.ttlSeconds !== undefined
|
|
395
396
|
? +options.ttlSeconds
|
|
396
397
|
: defaultTtlSecondsCLI,
|
package/lib/esm/utils/ao.js
CHANGED
|
@@ -134,7 +134,8 @@ export function createAoSigner(signer) {
|
|
|
134
134
|
return aoSigner;
|
|
135
135
|
}
|
|
136
136
|
export const defaultTargetManifestId = '-k7t8xMoB8hW482609Z9F4bTFMC3MnuW8bTvTyT8pFI';
|
|
137
|
-
export
|
|
137
|
+
export const defaultANTLogoId = 'Sie_26dvgyok0PZD_-iQAFOhOd5YxDTkczOLoqTTL_A';
|
|
138
|
+
export function initANTStateForAddress({ owner, targetId, ttlSeconds = 3600, keywords = [], controllers = [], description = '', ticker = 'aos', name = 'ANT', logo = defaultANTLogoId, }) {
|
|
138
139
|
return {
|
|
139
140
|
ticker,
|
|
140
141
|
name,
|
|
@@ -149,6 +150,7 @@ export function initANTStateForAddress({ owner, targetId, ttlSeconds = 3600, key
|
|
|
149
150
|
ttlSeconds,
|
|
150
151
|
},
|
|
151
152
|
},
|
|
153
|
+
logo,
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
/**
|
package/lib/esm/version.js
CHANGED
package/lib/types/cli/types.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export type ANTStateCLIOptions = WriteActionCLIOptions & {
|
|
|
101
101
|
description?: string;
|
|
102
102
|
controllers?: string[];
|
|
103
103
|
ttlSeconds?: string;
|
|
104
|
+
logo?: string;
|
|
104
105
|
};
|
|
105
106
|
export type JsonSerializable = string | number | boolean | null | JsonSerializable[] | {
|
|
106
107
|
[key: string]: JsonSerializable;
|
package/lib/types/types/io.d.ts
CHANGED
package/lib/types/utils/ao.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type SpawnANTState = {
|
|
|
11
11
|
ticker: string;
|
|
12
12
|
records: Record<string, AoANTRecord>;
|
|
13
13
|
balances: Record<WalletAddress, number>;
|
|
14
|
+
logo: string;
|
|
14
15
|
};
|
|
15
16
|
export type SpawnANTParams = {
|
|
16
17
|
signer: AoSigner;
|
|
@@ -43,7 +44,8 @@ export declare function evolveANT({ signer, processId, luaCodeTxId, ao, logger,
|
|
|
43
44
|
export declare function isAoSigner(value: unknown): value is AoSigner;
|
|
44
45
|
export declare function createAoSigner(signer: ContractSigner): AoSigner;
|
|
45
46
|
export declare const defaultTargetManifestId = "-k7t8xMoB8hW482609Z9F4bTFMC3MnuW8bTvTyT8pFI";
|
|
46
|
-
export declare
|
|
47
|
+
export declare const defaultANTLogoId = "Sie_26dvgyok0PZD_-iQAFOhOd5YxDTkczOLoqTTL_A";
|
|
48
|
+
export declare function initANTStateForAddress({ owner, targetId, ttlSeconds, keywords, controllers, description, ticker, name, logo, }: Partial<SpawnANTState> & {
|
|
47
49
|
targetId?: string;
|
|
48
50
|
ttlSeconds?: number;
|
|
49
51
|
owner: WalletAddress;
|
package/lib/types/version.d.ts
CHANGED