@ar.io/sdk 3.4.0-alpha.2 → 3.4.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.
@@ -161,6 +161,7 @@ export type AntReadOptions = {
161
161
  strict?: boolean;
162
162
  };
163
163
  export interface AoANTRead {
164
+ processId: string;
164
165
  getState(opts?: AntReadOptions): Promise<AoANTState>;
165
166
  getInfo(opts?: AntReadOptions): Promise<AoANTInfo>;
166
167
  getRecord({ undername }: {
@@ -179,67 +180,67 @@ export interface AoANTRead {
179
180
  getHandlers(): Promise<AoANTHandler[]>;
180
181
  }
181
182
  export interface AoANTWrite extends AoANTRead {
182
- transfer({ target }: {
183
+ transfer: WriteAction<{
183
184
  target: WalletAddress;
184
- }, options?: WriteOptions): Promise<AoMessageResult>;
185
- addController({ controller, }: {
185
+ }>;
186
+ addController: WriteAction<{
186
187
  controller: WalletAddress;
187
- }, options?: WriteOptions): Promise<AoMessageResult>;
188
- removeController({ controller, }: {
188
+ }>;
189
+ removeController: WriteAction<{
189
190
  controller: WalletAddress;
190
- }, options?: WriteOptions): Promise<AoMessageResult>;
191
- setRecord({ undername, transactionId, ttlSeconds, }: {
192
- undername: string;
193
- transactionId: string;
194
- ttlSeconds: number;
195
- }, options?: WriteOptions): Promise<AoMessageResult>;
196
- removeRecord({ undername }: {
197
- undername: string;
198
- }, options?: WriteOptions): Promise<AoMessageResult>;
199
- setBaseNameRecord({ transactionId, ttlSeconds, }: {
200
- transactionId: string;
201
- ttlSeconds: number;
202
- }): Promise<AoMessageResult>;
203
- setUndernameRecord({ undername, transactionId, ttlSeconds, }: {
191
+ }>;
192
+ /** @deprecated Use setUndernameRecord instead for undernames, and setBaseNameRecord instead for the top level name (e.g. "@") */
193
+ setRecord: WriteAction<AoANTSetUndernameRecordParams>;
194
+ removeRecord: WriteAction<{
204
195
  undername: string;
205
- transactionId: string;
206
- ttlSeconds: number;
207
- }): Promise<AoMessageResult>;
208
- removeUndernameRecord({ undername, }: {
196
+ }>;
197
+ setBaseNameRecord: WriteAction<AoANTSetBaseNameRecordParams>;
198
+ setUndernameRecord: WriteAction<AoANTSetUndernameRecordParams>;
199
+ removeUndernameRecord: WriteAction<{
209
200
  undername: string;
210
- }): Promise<AoMessageResult>;
211
- setTicker({ ticker }: {
201
+ }>;
202
+ setTicker: WriteAction<{
212
203
  ticker: string;
213
- }, options?: WriteOptions): Promise<AoMessageResult>;
214
- setDescription({ description }: {
204
+ }>;
205
+ setDescription: WriteAction<{
215
206
  description: string;
216
- }, options?: WriteOptions): Promise<AoMessageResult>;
217
- setKeywords({ keywords }: {
207
+ }>;
208
+ setKeywords: WriteAction<{
218
209
  keywords: string[];
219
- }, options?: WriteOptions): Promise<AoMessageResult>;
220
- setName({ name }: {
210
+ }>;
211
+ setName: WriteAction<{
221
212
  name: string;
222
- }, options?: WriteOptions): Promise<AoMessageResult>;
223
- setLogo({ txId }: {
213
+ }>;
214
+ setLogo: WriteAction<{
224
215
  txId: string;
225
- }, options?: WriteOptions): Promise<AoMessageResult>;
226
- releaseName({ name, arioProcessId }: {
216
+ }>;
217
+ releaseName: WriteAction<{
227
218
  name: string;
228
219
  arioProcessId: string;
229
- }, options?: WriteOptions): Promise<AoMessageResult>;
230
- reassignName({ name, arioProcessId, antProcessId, }: {
220
+ }>;
221
+ reassignName: WriteAction<{
231
222
  name: string;
232
223
  arioProcessId: string;
233
224
  antProcessId: string;
234
- }, options?: WriteOptions): Promise<AoMessageResult>;
235
- approvePrimaryNameRequest({ name, address, arioProcessId, }: {
225
+ }>;
226
+ approvePrimaryNameRequest: WriteAction<{
236
227
  name: string;
237
- address: WalletAddress;
228
+ address: string;
238
229
  arioProcessId: string;
239
- }, options?: WriteOptions): Promise<AoMessageResult>;
240
- removePrimaryNames({ names, arioProcessId, notifyOwners, }: {
230
+ }>;
231
+ removePrimaryNames: WriteAction<{
241
232
  names: string[];
242
233
  arioProcessId: string;
243
234
  notifyOwners?: boolean;
244
- }, options?: WriteOptions): Promise<AoMessageResult>;
235
+ }>;
245
236
  }
237
+ /** utility type to ensure WriteOptions are appended to each parameter set */
238
+ type WriteAction<P, R = AoMessageResult> = (params: P, options?: WriteOptions) => Promise<R>;
239
+ export type AoANTSetBaseNameRecordParams = {
240
+ transactionId: string;
241
+ ttlSeconds: number;
242
+ };
243
+ export type AoANTSetUndernameRecordParams = AoANTSetBaseNameRecordParams & {
244
+ undername: string;
245
+ };
246
+ export {};
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "3.4.0-alpha.1";
16
+ export declare const version = "3.4.0-alpha.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.4.0-alpha.2",
3
+ "version": "3.4.0-alpha.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"