@ar.io/sdk 2.5.0-alpha.6 → 2.5.0-alpha.7
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 +15 -0
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/ant.js +19 -0
- package/lib/cjs/types/ant.js +1 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/ant.js +19 -0
- package/lib/esm/types/ant.js +1 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/ant.d.ts +12 -0
- package/lib/types/types/ant.d.ts +5 -2
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/ant.js
CHANGED
|
@@ -393,6 +393,25 @@ class AoANTWriteable extends AoANTReadable {
|
|
|
393
393
|
signer: this.signer,
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* @param txId @type {string} - Arweave transaction id of the logo we want to set
|
|
398
|
+
* @param options @type {WriteOptions} - additional options to add to the write interaction (optional)
|
|
399
|
+
* @returns {Promise<AoMessageResult>} The result of the interaction.
|
|
400
|
+
* @example
|
|
401
|
+
* ```ts
|
|
402
|
+
* ant.setLogo({ logo: "U7RXcpaVShG4u9nIcPVmm2FJSM5Gru9gQCIiRaIPV7f" });
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
async setLogo({ txId }, options) {
|
|
406
|
+
return this.process.send({
|
|
407
|
+
tags: [
|
|
408
|
+
...(options?.tags ?? []),
|
|
409
|
+
{ name: 'Action', value: 'Set-Logo' },
|
|
410
|
+
{ name: 'Logo', value: txId },
|
|
411
|
+
],
|
|
412
|
+
signer: this.signer,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
396
415
|
/**
|
|
397
416
|
* @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
|
|
398
417
|
* @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
|
package/lib/cjs/types/ant.js
CHANGED
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/ant.js
CHANGED
|
@@ -388,6 +388,25 @@ export class AoANTWriteable extends AoANTReadable {
|
|
|
388
388
|
signer: this.signer,
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
+
/**
|
|
392
|
+
* @param txId @type {string} - Arweave transaction id of the logo we want to set
|
|
393
|
+
* @param options @type {WriteOptions} - additional options to add to the write interaction (optional)
|
|
394
|
+
* @returns {Promise<AoMessageResult>} The result of the interaction.
|
|
395
|
+
* @example
|
|
396
|
+
* ```ts
|
|
397
|
+
* ant.setLogo({ logo: "U7RXcpaVShG4u9nIcPVmm2FJSM5Gru9gQCIiRaIPV7f" });
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
async setLogo({ txId }, options) {
|
|
401
|
+
return this.process.send({
|
|
402
|
+
tags: [
|
|
403
|
+
...(options?.tags ?? []),
|
|
404
|
+
{ name: 'Action', value: 'Set-Logo' },
|
|
405
|
+
{ name: 'Logo', value: txId },
|
|
406
|
+
],
|
|
407
|
+
signer: this.signer,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
391
410
|
/**
|
|
392
411
|
* @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
|
|
393
412
|
* @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
|
package/lib/esm/types/ant.js
CHANGED
package/lib/esm/version.js
CHANGED
|
@@ -214,6 +214,18 @@ export declare class AoANTWriteable extends AoANTReadable implements AoANTWrite
|
|
|
214
214
|
setKeywords({ keywords }: {
|
|
215
215
|
keywords: string[];
|
|
216
216
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
217
|
+
/**
|
|
218
|
+
* @param txId @type {string} - Arweave transaction id of the logo we want to set
|
|
219
|
+
* @param options @type {WriteOptions} - additional options to add to the write interaction (optional)
|
|
220
|
+
* @returns {Promise<AoMessageResult>} The result of the interaction.
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* ant.setLogo({ logo: "U7RXcpaVShG4u9nIcPVmm2FJSM5Gru9gQCIiRaIPV7f" });
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
setLogo({ txId }: {
|
|
227
|
+
txId: string;
|
|
228
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
217
229
|
/**
|
|
218
230
|
* @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
|
|
219
231
|
* @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
|
package/lib/types/types/ant.d.ts
CHANGED
|
@@ -145,9 +145,9 @@ export declare const AntStateSchema: z.ZodObject<{
|
|
|
145
145
|
export type AoANTState = z.infer<typeof AntStateSchema>;
|
|
146
146
|
export declare const AntReadHandlers: readonly ["balance", "balances", "totalSupply", "info", "controllers", "record", "records", "state"];
|
|
147
147
|
export type AoANTReadHandler = (typeof AntReadHandlers)[number];
|
|
148
|
-
export declare const AntWriteHandlers: readonly ["evolve", "_eval", "_default", "transfer", "addController", "removeController", "setRecord", "removeRecord", "setName", "setTicker", "setDescription", "setKeywords", "initializeState", "releaseName", "reassignName"];
|
|
148
|
+
export declare const AntWriteHandlers: readonly ["evolve", "_eval", "_default", "transfer", "addController", "removeController", "setRecord", "removeRecord", "setName", "setTicker", "setDescription", "setKeywords", "setLogo", "initializeState", "releaseName", "reassignName"];
|
|
149
149
|
export type AoANTWriteHandler = (typeof AntWriteHandlers)[number];
|
|
150
|
-
export declare const AntHandlerNames: ("balance" | "balances" | "totalSupply" | "info" | "controllers" | "record" | "records" | "state" | "evolve" | "_eval" | "_default" | "transfer" | "addController" | "removeController" | "setRecord" | "removeRecord" | "setName" | "setTicker" | "setDescription" | "setKeywords" | "initializeState" | "releaseName" | "reassignName")[];
|
|
150
|
+
export declare const AntHandlerNames: ("balance" | "balances" | "totalSupply" | "info" | "controllers" | "record" | "records" | "state" | "evolve" | "_eval" | "_default" | "transfer" | "addController" | "removeController" | "setRecord" | "removeRecord" | "setName" | "setTicker" | "setDescription" | "setKeywords" | "setLogo" | "initializeState" | "releaseName" | "reassignName")[];
|
|
151
151
|
export type AoANTHandler = AoANTWriteHandler | AoANTReadHandler;
|
|
152
152
|
export declare const AntHandlersSchema: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
153
153
|
export declare const AntInfoSchema: z.ZodObject<{
|
|
@@ -240,6 +240,9 @@ export interface AoANTWrite extends AoANTRead {
|
|
|
240
240
|
setName({ name }: {
|
|
241
241
|
name: string;
|
|
242
242
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
243
|
+
setLogo({ txId }: {
|
|
244
|
+
txId: string;
|
|
245
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
243
246
|
releaseName({ name, ioProcessId }: {
|
|
244
247
|
name: string;
|
|
245
248
|
ioProcessId: string;
|
package/lib/types/version.d.ts
CHANGED