fireblocks-sdk
Advanced tools
Comparing version 1.4.6 to 1.5.0
@@ -1,2 +0,2 @@ | ||
import { VaultAccountResponse, CreateTransactionResponse, TransactionArguments, AssetResponse, ExchangeResponse, TransactionResponse, TransactionFilter, CancelTransactionResponse, WalletContainerResponse, WalletAssetResponse, DepositAddressResponse, GenerateAddressResponse, OperationSuccessResponse, NetworkConnectionResponse, FiatAccountResponse } from "./types"; | ||
import { VaultAccountResponse, CreateTransactionResponse, TransactionArguments, AssetResponse, ExchangeResponse, TransactionResponse, TransactionFilter, CancelTransactionResponse, WalletContainerResponse, WalletAssetResponse, DepositAddressResponse, GenerateAddressResponse, OperationSuccessResponse, NetworkConnectionResponse, FiatAccountResponse, CreateTransferTicketArgs, TransferTicketResponse, TermResponse, ExecuteTermArgs, CreateTransferTicketResponse } from "./types"; | ||
export * from "./types"; | ||
@@ -232,2 +232,33 @@ export declare class FireblocksSDK { | ||
/** | ||
* Creates a new transfer ticket | ||
*/ | ||
createTransferTicket(options: CreateTransferTicketArgs): Promise<CreateTransferTicketResponse>; | ||
/** | ||
* Gets all transfer tickets | ||
*/ | ||
getTransferTickets(): Promise<TransferTicketResponse[]>; | ||
/** | ||
* Get a transfer ticket by ticket ID | ||
* @param ticketId | ||
*/ | ||
getTransferTicketById(ticketId: string): Promise<TransferTicketResponse>; | ||
/** | ||
* Get a term of transfer ticket | ||
* @param ticketId | ||
* @param termId | ||
*/ | ||
getTransferTicketTerm(ticketId: string, termId: string): Promise<TermResponse>; | ||
/** | ||
* Cancel the transfer ticket | ||
* @param ticketId | ||
*/ | ||
cancelTransferTicket(ticketId: string): Promise<any>; | ||
/** | ||
* Executes a transaction for a single term of a transfer ticket | ||
* @param ticketId | ||
* @param termId | ||
* @param options | ||
*/ | ||
executeTransferTicketTerm(ticketId: string, termId: string, options: ExecuteTermArgs): Promise<any>; | ||
/** | ||
* Deletes a single internal wallet | ||
@@ -234,0 +265,0 @@ * @param walletId The internal wallet ID |
@@ -100,3 +100,6 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/addresses`, { description, customerRefId }); | ||
return yield this.apiClient.issuePostRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/addresses`, { | ||
description, | ||
customerRefId | ||
}); | ||
}); | ||
@@ -451,2 +454,57 @@ } | ||
/** | ||
* Creates a new transfer ticket | ||
*/ | ||
createTransferTicket(options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest("/v1/transfer_tickets", options); | ||
}); | ||
} | ||
/** | ||
* Gets all transfer tickets | ||
*/ | ||
getTransferTickets() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueGetRequest("/v1/transfer_tickets"); | ||
}); | ||
} | ||
/** | ||
* Get a transfer ticket by ticket ID | ||
* @param ticketId | ||
*/ | ||
getTransferTicketById(ticketId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueGetRequest(`/v1/transfer_tickets/${ticketId}`); | ||
}); | ||
} | ||
/** | ||
* Get a term of transfer ticket | ||
* @param ticketId | ||
* @param termId | ||
*/ | ||
getTransferTicketTerm(ticketId, termId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueGetRequest(`/v1/transfer_tickets/${ticketId}/${termId}`); | ||
}); | ||
} | ||
/** | ||
* Cancel the transfer ticket | ||
* @param ticketId | ||
*/ | ||
cancelTransferTicket(ticketId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/transfer_tickets/${ticketId}/cancel`, {}); | ||
}); | ||
} | ||
/** | ||
* Executes a transaction for a single term of a transfer ticket | ||
* @param ticketId | ||
* @param termId | ||
* @param options | ||
*/ | ||
executeTransferTicketTerm(ticketId, termId, options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/transfer_tickets/${ticketId}/${termId}/transfer`, options); | ||
}); | ||
} | ||
/** | ||
* Deletes a single internal wallet | ||
@@ -453,0 +511,0 @@ * @param walletId The internal wallet ID |
@@ -167,2 +167,8 @@ export interface VaultAccountResponse { | ||
limit?: number; | ||
txHash?: string; | ||
assets?: string; | ||
sourceType?: PeerType; | ||
destType?: PeerType; | ||
sourceId?: string; | ||
destId?: string; | ||
} | ||
@@ -217,2 +223,51 @@ export declare enum TransactionOrder { | ||
} | ||
export interface CreateTransferTicketArgs { | ||
externalTicketId: string; | ||
description?: string; | ||
terms: { | ||
networkConnectionId: string; | ||
outgoing: boolean; | ||
asset: string; | ||
amount: string; | ||
note: string; | ||
}[]; | ||
} | ||
export declare enum TransferTicketStatus { | ||
OPEN = "OPEN", | ||
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED", | ||
FULFILLED = "FULFILLED", | ||
FAILED = "FAILED", | ||
CANCELED = "CANCELED" | ||
} | ||
export declare enum TransferTicketTermStatus { | ||
OPEN = "OPEN", | ||
FULFILLED = "FULFILLED" | ||
} | ||
export interface TransferTicketResponse { | ||
ticketId: string; | ||
externalTicketId: string; | ||
description: string; | ||
status: TransferTicketStatus; | ||
terms: TermResponse[]; | ||
} | ||
export interface TermResponse { | ||
termId: string; | ||
networkConnectionId: string; | ||
outgoing: boolean; | ||
asset: string; | ||
amount: string; | ||
txIds: string[]; | ||
status: TransferTicketTermStatus; | ||
note: string; | ||
} | ||
export interface ExecuteTermArgs { | ||
source: { | ||
type: string; | ||
id: string; | ||
}; | ||
fee?: number; | ||
gasPrice?: number; | ||
} | ||
export interface CreateTransferTicketResponse { | ||
} | ||
export {}; |
@@ -55,2 +55,15 @@ "use strict"; | ||
})(TransactionOperation = exports.TransactionOperation || (exports.TransactionOperation = {})); | ||
var TransferTicketStatus; | ||
(function (TransferTicketStatus) { | ||
TransferTicketStatus["OPEN"] = "OPEN"; | ||
TransferTicketStatus["PARTIALLY_FULFILLED"] = "PARTIALLY_FULFILLED"; | ||
TransferTicketStatus["FULFILLED"] = "FULFILLED"; | ||
TransferTicketStatus["FAILED"] = "FAILED"; | ||
TransferTicketStatus["CANCELED"] = "CANCELED"; | ||
})(TransferTicketStatus = exports.TransferTicketStatus || (exports.TransferTicketStatus = {})); | ||
var TransferTicketTermStatus; | ||
(function (TransferTicketTermStatus) { | ||
TransferTicketTermStatus["OPEN"] = "OPEN"; | ||
TransferTicketTermStatus["FULFILLED"] = "FULFILLED"; | ||
})(TransferTicketTermStatus = exports.TransferTicketTermStatus || (exports.TransferTicketTermStatus = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "fireblocks-sdk", | ||
"version": "1.4.6", | ||
"version": "1.5.0", | ||
"main": "dist/fireblocks-sdk.js", | ||
@@ -8,3 +8,3 @@ "types": "dist/fireblocks-sdk.d.ts", | ||
"build": "tsc && npm run tslint", | ||
"tslint": "tslint -c tslint.json -p tsconfig.json", | ||
"tslint": "tslint -c tslint.json -p tsconfig.json --fix", | ||
"prepare": "npm run build", | ||
@@ -11,0 +11,0 @@ "postversion": "git push && git push --tags" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
67265
1371
1