Skip to content

Commit

Permalink
Merge pull request #222 from ar-io/PE-6746-cancel-delegate-withdrawal
Browse files Browse the repository at this point in the history
feat(PE-6746): add cancel delegate withdrawal method
  • Loading branch information
dtfiedler authored Oct 4, 2024
2 parents b540326 + a3827dc commit 21d90dc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/common/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,4 +960,20 @@ export class IOWriteable extends IOReadable implements AoIOWrite {
],
});
}

async cancelDelegateWithdrawal(
params: { address: string; vaultId: string },
options?: WriteOptions | undefined,
): Promise<AoMessageResult> {
const { tags = [] } = options || {};
return this.process.send({
signer: this.signer,
tags: [
...tags,
{ name: 'Action', value: 'Cancel-Delegate-Withdrawal' },
{ name: 'Address', value: params.address },
{ name: 'Vault-Id', value: params.vaultId },
],
});
}
}
7 changes: 7 additions & 0 deletions src/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,13 @@ export interface AoIOWrite extends AoIORead {
},
options?: WriteOptions,
): Promise<AoMessageResult>;
cancelDelegateWithdrawal(
params: {
address: string;
vaultId: string;
},
options?: WriteOptions,
): Promise<AoMessageResult>;
}

export interface AoANTRead {
Expand Down

0 comments on commit 21d90dc

Please sign in to comment.