fireblocks-sdk
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -1,2 +0,2 @@ | ||
import { VaultAccountResponse, CreateTransactionResponse, TransactionArguments, AssetResponse, ExchangeResponse, TransactionResponse, TransactionFilter, CancelTransactionResponse, WalletContainerResponse, WalletAssetResponse, DepositAddressResponse, GenerateAddressResponse, OperationSuccessResponse, NetworkConnectionResponse, FiatAccountResponse, CreateTransferTicketArgs, TransferTicketResponse, TermResponse, ExecuteTermArgs, CreateTransferTicketResponse, EstimateTransactionFeeResponse, EstimateFeeResponse } from "./types"; | ||
import { VaultAccountResponse, CreateTransactionResponse, TransactionArguments, AssetResponse, ExchangeResponse, TransactionResponse, TransactionFilter, CancelTransactionResponse, WalletContainerResponse, WalletAssetResponse, DepositAddressResponse, GenerateAddressResponse, OperationSuccessResponse, NetworkConnectionResponse, FiatAccountResponse, CreateTransferTicketArgs, TransferTicketResponse, TermResponse, ExecuteTermArgs, CreateTransferTicketResponse, EstimateTransactionFeeResponse, EstimateFeeResponse, PublicKeyInfoArgs, PublicKeyInfoForVaultAccountArgs } from "./types"; | ||
export * from "./types"; | ||
@@ -326,3 +326,3 @@ export declare class FireblocksSDK { | ||
/** | ||
* Set the required number of confirmtations for transactions by tx hash | ||
* Set the required number of confirmations for transactions by tx hash | ||
* @param txHash | ||
@@ -332,2 +332,12 @@ * @param requiredConfirmationsNumber | ||
setConfirmationThresholdForTxHash(txHash: string, requiredConfirmationsNumber: number): Promise<any>; | ||
/** | ||
* Get the public key information | ||
* @param args | ||
*/ | ||
getPublicKeyInfo(args: PublicKeyInfoArgs): Promise<any>; | ||
/** | ||
* Get the public key information for a vault account | ||
* @param args | ||
*/ | ||
getPublicKeyInfoForVaultAccount(args: PublicKeyInfoForVaultAccountArgs): Promise<any>; | ||
} |
@@ -627,3 +627,3 @@ "use strict"; | ||
/** | ||
* Set the required number of confirmtations for transactions by tx hash | ||
* Set the required number of confirmations for transactions by tx hash | ||
* @param txHash | ||
@@ -637,4 +637,36 @@ * @param requiredConfirmationsNumber | ||
} | ||
/** | ||
* Get the public key information | ||
* @param args | ||
*/ | ||
getPublicKeyInfo(args) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let url = `/v1/vault/public_key_info`; | ||
if (args.algorithm) { | ||
url += `?algorithm=${args.algorithm}`; | ||
} | ||
if (args.derivationPath) { | ||
url += `&derivationPath=${args.derivationPath}`; | ||
} | ||
if (args.compressed) { | ||
url += `&compressed=${args.compressed}`; | ||
} | ||
return yield this.apiClient.issueGetRequest(url); | ||
}); | ||
} | ||
/** | ||
* Get the public key information for a vault account | ||
* @param args | ||
*/ | ||
getPublicKeyInfoForVaultAccount(args) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let url = `/v1/vault/accounts/${args.vaultAccountId}/${args.assetId}/${args.change}/${args.addressIndex}/public_key_info`; | ||
if (args.compressed) { | ||
url += `?compressed=${args.compressed}`; | ||
} | ||
return yield this.apiClient.issueGetRequest(url); | ||
}); | ||
} | ||
} | ||
exports.FireblocksSDK = FireblocksSDK; | ||
//# sourceMappingURL=fireblocks-sdk.js.map |
@@ -66,4 +66,4 @@ export interface VaultAccountResponse { | ||
export interface TransferPeerPath { | ||
type: PeerType; | ||
id: string; | ||
type?: PeerType; | ||
id?: string; | ||
} | ||
@@ -93,7 +93,22 @@ interface DestinationTransferPeerPath { | ||
} | ||
export declare enum SigningAlgorithm { | ||
MPC_ECDSA_SECP256K1 = "MPC_ECDSA_SECP256K1", | ||
MPC_ECDSA_SECP256R1 = "MPC_ECDSA_SECP256R1", | ||
MPC_EDDSA_ED25519 = "MPC_EDDSA_ED25519" | ||
} | ||
export interface RawMessageData { | ||
messages: RawMessage[]; | ||
algorithm?: SigningAlgorithm; | ||
} | ||
export interface RawMessage { | ||
content: string; | ||
bip44addressIndex?: number; | ||
bip44change?: number; | ||
derivationPath?: number[]; | ||
} | ||
export interface TransactionArguments { | ||
assetId: string; | ||
source: TransferPeerPath; | ||
assetId?: string; | ||
source?: TransferPeerPath; | ||
destination?: DestinationTransferPeerPath; | ||
amount: number | string; | ||
amount?: number | string; | ||
operation?: TransactionOperation; | ||
@@ -107,2 +122,5 @@ fee?: number; | ||
customerRefId?: string; | ||
extraParameters?: { | ||
rawMessageData: RawMessageData; | ||
}; | ||
} | ||
@@ -169,3 +187,16 @@ export interface ExchangeResponse { | ||
}; | ||
signedMessages?: SignedMessageResponse[]; | ||
} | ||
export interface SignedMessageResponse { | ||
content: string; | ||
algorithm: string; | ||
derivationPath: string; | ||
signature: { | ||
fullSig: string; | ||
r?: string; | ||
s?: string; | ||
v?: number; | ||
}; | ||
publicKey: string; | ||
} | ||
export interface CancelTransactionResponse { | ||
@@ -247,3 +278,4 @@ success: boolean; | ||
SUPPLY_TO_COMPOUND = "SUPPLY_TO_COMPOUND", | ||
REDEEM_FROM_COMPOUND = "REDEEM_FROM_COMPOUND" | ||
REDEEM_FROM_COMPOUND = "REDEEM_FROM_COMPOUND", | ||
RAW = "RAW" | ||
} | ||
@@ -300,2 +332,14 @@ export interface CreateTransferTicketArgs { | ||
} | ||
export interface PublicKeyInfoArgs { | ||
algorithm?: string; | ||
derivationPath?: string; | ||
compressed?: boolean; | ||
} | ||
export interface PublicKeyInfoForVaultAccountArgs { | ||
assetId: string; | ||
vaultAccountId: number; | ||
change: number; | ||
addressIndex: number; | ||
compressed?: boolean; | ||
} | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TransferTicketTermStatus = exports.TransferTicketStatus = exports.TransactionOperation = exports.PeerType = exports.TransactionStatus = exports.TransactionOrder = void 0; | ||
exports.TransferTicketTermStatus = exports.TransferTicketStatus = exports.TransactionOperation = exports.PeerType = exports.TransactionStatus = exports.TransactionOrder = exports.SigningAlgorithm = void 0; | ||
var SigningAlgorithm; | ||
(function (SigningAlgorithm) { | ||
SigningAlgorithm["MPC_ECDSA_SECP256K1"] = "MPC_ECDSA_SECP256K1"; | ||
SigningAlgorithm["MPC_ECDSA_SECP256R1"] = "MPC_ECDSA_SECP256R1"; | ||
SigningAlgorithm["MPC_EDDSA_ED25519"] = "MPC_EDDSA_ED25519"; | ||
})(SigningAlgorithm = exports.SigningAlgorithm || (exports.SigningAlgorithm = {})); | ||
var TransactionOrder; | ||
@@ -55,2 +61,3 @@ (function (TransactionOrder) { | ||
TransactionOperation["REDEEM_FROM_COMPOUND"] = "REDEEM_FROM_COMPOUND"; | ||
TransactionOperation["RAW"] = "RAW"; | ||
})(TransactionOperation = exports.TransactionOperation || (exports.TransactionOperation = {})); | ||
@@ -57,0 +64,0 @@ var TransferTicketStatus; |
{ | ||
"name": "fireblocks-sdk", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"main": "dist/fireblocks-sdk.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/fireblocks-sdk.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
75382
1556