Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ export function getTransactionDetails(chainId: string, transactionId: string): P
})
}

/**
* Delete a transaction by its safeTxHash
*/
export function deleteTransaction(
chainId: string,
safeTxHash: string,
signature: operations['delete_transaction']['parameters']['body']['signature'],
): Promise<void> {
return deleteEndpoint(baseUrl, '/v1/chains/{chainId}/transactions/{safeTxHash}', {
path: { chainId, safeTxHash },
body: { signature },
})
}

/**
* Request a gas estimate & recommmended tx nonce for a created transaction
*/
Expand Down
23 changes: 23 additions & 0 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ export interface paths extends PathRegistry {
}
}
}
'/v1/chains/{chainId}/transactions/{safeTxHash}': {
delete: operations['delete_transaction']
parameters: {
path: {
chainId: string
safeTxHash: string
}
}
}
'/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations': {
post: operations['post_safe_gas_estimation']
parameters: {
Expand Down Expand Up @@ -554,6 +563,20 @@ export interface operations {
}
}
}
delete_transaction: {
parameters: {
path: {
chainId: string
safeTxHash: string
}
body: { signature: string }
}
responses: {
200: {
schema: void
}
}
}
post_safe_gas_estimation: {
parameters: {
path: {
Expand Down