fireblocks-sdk
Advanced tools
Comparing version 4.0.0 to 4.1.0
{ | ||
"name": "fireblocks-sdk", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"main": "dist/src/fireblocks-sdk.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/src/fireblocks-sdk.d.ts", |
import { ApiClient } from "./api-client"; | ||
import { IAuthProvider } from "./iauth-provider"; | ||
import { AllocateFundsRequest, AssetResponse, AssetTypeResponse, CancelTransactionResponse, ConvertExchangeAssetResponse, CreateTransactionResponse, DeallocateFundsRequest, DepositAddressResponse, EstimateFeeResponse, EstimateTransactionFeeResponse, ExchangeResponse, ExternalWalletAsset, FiatAccountResponse, GasStationInfo, GenerateAddressResponse, InternalWalletAsset, MaxSpendableAmountResponse, NetworkConnectionResponse, OffExchangeEntityResponse, OperationSuccessResponse, PagedVaultAccountsRequestFilters, PagedVaultAccountsResponse, PublicKeyInfoArgs, PublicKeyInfoForVaultAccountArgs, RequestOptions, ResendWebhooksResponse, TransactionArguments, TransactionFilter, TransactionPageFilter, TransactionPageResponse, TransactionResponse, User, ValidateAddressResponse, VaultAccountResponse, VaultAssetResponse, VaultBalancesFilter, WalletContainerResponse, SetFeePayerConfiguration, FeePayerConfiguration, CreateWeb3ConnectionResponse, Session, NetworkConnectionRoutingPolicy, NetworkIdRoutingPolicy, NetworkIdResponse, TimePeriod, AuditsResponse, NFTOwnershipFilter, Token, TokenWithBalance, Web3PagedResponse, CreateWalletConnectPayload, Web3ConnectionType, GetWeb3ConnectionsPayload, PublicKeyResponse, AllocateFundsResponse, GetNFTsFilter, SettleOffExchangeAccountResponse, PublicKeyInformation, DropTransactionResponse } from "./types"; | ||
import { AllocateFundsRequest, AssetResponse, AssetTypeResponse, CancelTransactionResponse, ConvertExchangeAssetResponse, CreateTransactionResponse, DeallocateFundsRequest, DepositAddressResponse, EstimateFeeResponse, EstimateTransactionFeeResponse, ExchangeResponse, ExternalWalletAsset, FiatAccountResponse, GasStationInfo, GenerateAddressResponse, InternalWalletAsset, MaxSpendableAmountResponse, MaxBip44IndexUsedResponse, NetworkConnectionResponse, OffExchangeEntityResponse, OperationSuccessResponse, PagedVaultAccountsRequestFilters, PagedVaultAccountsResponse, PublicKeyInfoArgs, PublicKeyInfoForVaultAccountArgs, RequestOptions, ResendWebhooksResponse, TransactionArguments, TransactionFilter, TransactionPageFilter, TransactionPageResponse, TransactionResponse, User, ValidateAddressResponse, VaultAccountResponse, VaultAssetResponse, VaultBalancesFilter, WalletContainerResponse, SetFeePayerConfiguration, FeePayerConfiguration, CreateWeb3ConnectionResponse, Session, NetworkConnectionRoutingPolicy, NetworkIdRoutingPolicy, NetworkIdResponse, TimePeriod, AuditsResponse, NFTOwnershipFilter, Token, TokenWithBalance, Web3PagedResponse, CreateWalletConnectPayload, Web3ConnectionType, GetWeb3ConnectionsPayload, PublicKeyResponse, AllocateFundsResponse, SettleOffExchangeAccountResponse, AddCollateralTransactionRequest, RemoveCollateralTransactionRequest, GetSettlementTransactionsResponse, SettlementRequest, SettlementResponse, GetNFTsFilter, PublicKeyInformation, DropTransactionResponse, TokenLink, TokenLinkPermissionEntry, IssueTokenRequest } from "./types"; | ||
import { AxiosProxyConfig, AxiosResponse } from "axios"; | ||
@@ -534,2 +534,6 @@ export * from "./types"; | ||
/** | ||
* Get maximum BIP44 index used in deriving addresses or in change addresses | ||
*/ | ||
getMaxBip44IndexUsed(vaultAccountId: string, assetId: string): Promise<MaxBip44IndexUsedResponse>; | ||
/** | ||
* Get all vault assets balance overview | ||
@@ -590,2 +594,25 @@ */ | ||
/** | ||
* Add collateral account, create deposit request | ||
* @param depositRequest | ||
* @param requestOptions | ||
*/ | ||
addCollateral(depositRequest: AddCollateralTransactionRequest, requestOptions?: RequestOptions): Promise<CreateTransactionResponse>; | ||
/** | ||
* Remove collateral account, create withdraw request | ||
* @param withdrawRequest | ||
* @param requestOptions | ||
*/ | ||
removeCollateral(withdrawRequest: RemoveCollateralTransactionRequest, requestOptions?: RequestOptions): Promise<CreateTransactionResponse>; | ||
/** | ||
* | ||
* @param requestOptions | ||
*/ | ||
getSettlementTransactions(settlementRequest: SettlementRequest): Promise<GetSettlementTransactionsResponse>; | ||
/** | ||
* | ||
* @param settlementRequest | ||
* @param requestOptions | ||
*/ | ||
settlement(settlementRequest: SettlementRequest, requestOptions?: RequestOptions): Promise<SettlementResponse>; | ||
/** | ||
* Set Fee Payer configuration | ||
@@ -693,3 +720,41 @@ * @param feePayerConfiguration | ||
refreshNFTOwnershipByVault(vaultAccountId: string, blockchainDescriptor: string): Promise<void>; | ||
/** | ||
* Get all tokens linked to the tenant | ||
* @param limit | ||
* @param offset | ||
*/ | ||
getLinkedTokens(limit?: number, offset?: number): Promise<TokenLink[]>; | ||
/** | ||
* Issue a new token and link it to the tenant | ||
* @param request | ||
*/ | ||
issueNewToken(request: IssueTokenRequest): Promise<TokenLink>; | ||
/** | ||
* Get a token linked to the tenant by asset id | ||
* @param assetId | ||
*/ | ||
getLinkedToken(assetId: string): Promise<TokenLink>; | ||
/** | ||
* Link a token to the tenant | ||
* @param assetId | ||
*/ | ||
linkToken(assetId: string): Promise<TokenLink>; | ||
/** | ||
* remove a link to a token from the tenant | ||
* @param assetId | ||
*/ | ||
unlinkToken(assetId: string): Promise<TokenLink>; | ||
/** | ||
* Add permissions to a linked token | ||
* @param assetId | ||
* @param permissions | ||
*/ | ||
addLinkedTokenPermissions(assetId: string, permissions: TokenLinkPermissionEntry[]): Promise<TokenLink>; | ||
/** | ||
* Remove permissions from a linked token | ||
* @param assetId | ||
* @param permission | ||
*/ | ||
removeLinkedTokenPermissions(assetId: string, permission: TokenLinkPermissionEntry): Promise<TokenLink>; | ||
private getCommaSeparatedList; | ||
} |
@@ -968,2 +968,11 @@ "use strict"; | ||
/** | ||
* Get maximum BIP44 index used in deriving addresses or in change addresses | ||
*/ | ||
getMaxBip44IndexUsed(vaultAccountId, assetId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const url = `/v1/vault/accounts/${vaultAccountId}/${assetId}/max_bip44_index_used`; | ||
return yield this.apiClient.issueGetRequest(url); | ||
}); | ||
} | ||
/** | ||
* Get all vault assets balance overview | ||
@@ -1072,2 +1081,41 @@ */ | ||
/** | ||
* Add collateral account, create deposit request | ||
* @param depositRequest | ||
* @param requestOptions | ||
*/ | ||
addCollateral(depositRequest, requestOptions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/off_exchange/add`, depositRequest, requestOptions); | ||
}); | ||
} | ||
/** | ||
* Remove collateral account, create withdraw request | ||
* @param withdrawRequest | ||
* @param requestOptions | ||
*/ | ||
removeCollateral(withdrawRequest, requestOptions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/off_exchange/remove`, withdrawRequest, requestOptions); | ||
}); | ||
} | ||
/** | ||
* | ||
* @param requestOptions | ||
*/ | ||
getSettlementTransactions(settlementRequest) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueGetRequest(`/v1/off_exchange/settlements/transactions?mainExchangeAccountId=${settlementRequest.mainExchangeAccountId}`); | ||
}); | ||
} | ||
/** | ||
* | ||
* @param settlementRequest | ||
* @param requestOptions | ||
*/ | ||
settlement(settlementRequest, requestOptions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/off_exchange/settlements/trader`, settlementRequest, requestOptions); | ||
}); | ||
} | ||
/** | ||
* Set Fee Payer configuration | ||
@@ -1237,2 +1285,73 @@ * @param feePayerConfiguration | ||
} | ||
/** | ||
* Get all tokens linked to the tenant | ||
* @param limit | ||
* @param offset | ||
*/ | ||
getLinkedTokens(limit = 100, offset = 0) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const requestFilter = { | ||
limit, | ||
offset | ||
}; | ||
const url = `/v1/tokenization/tokens?${query_string_1.default.stringify(requestFilter)}`; | ||
return yield this.apiClient.issueGetRequest(url); | ||
}); | ||
} | ||
/** | ||
* Issue a new token and link it to the tenant | ||
* @param request | ||
*/ | ||
issueNewToken(request) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePostRequest(`/v1/tokenization/tokens/`, request); | ||
}); | ||
} | ||
/** | ||
* Get a token linked to the tenant by asset id | ||
* @param assetId | ||
*/ | ||
getLinkedToken(assetId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueGetRequest(`/v1/tokenization/tokens/${assetId}`); | ||
}); | ||
} | ||
/** | ||
* Link a token to the tenant | ||
* @param assetId | ||
*/ | ||
linkToken(assetId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePutRequest(`/v1/tokenization/tokens/${assetId}`, {}); | ||
}); | ||
} | ||
/** | ||
* remove a link to a token from the tenant | ||
* @param assetId | ||
*/ | ||
unlinkToken(assetId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueDeleteRequest(`/v1/tokenization/tokens/${assetId}`); | ||
}); | ||
} | ||
/** | ||
* Add permissions to a linked token | ||
* @param assetId | ||
* @param permissions | ||
*/ | ||
addLinkedTokenPermissions(assetId, permissions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issuePutRequest(`/v1/tokenization/tokens/${assetId}/permissions`, { permissions }); | ||
}); | ||
} | ||
/** | ||
* Remove permissions from a linked token | ||
* @param assetId | ||
* @param permission | ||
*/ | ||
removeLinkedTokenPermissions(assetId, permission) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.apiClient.issueDeleteRequest(`/v1/tokenization/tokens/${assetId}/permissions?permission=${permission.permission}&vaultAccountId=${permission.vaultAccountId}`); | ||
}); | ||
} | ||
getCommaSeparatedList(items) { | ||
@@ -1239,0 +1358,0 @@ return items ? items.join(",") : undefined; |
@@ -466,3 +466,4 @@ import { AxiosResponseHeaders } from "axios"; | ||
media: MediaEntity[]; | ||
metadataURI: string; | ||
metadataURI?: string; | ||
cachedMetadataURI?: string; | ||
collection?: NFTCollection; | ||
@@ -657,2 +658,6 @@ } | ||
} | ||
export interface MaxBip44IndexUsedResponse { | ||
maxBip44AddressIndexUsed?: number; | ||
maxBip44ChangeAddressIndexUsed?: number; | ||
} | ||
export interface VaultAccountsFilter { | ||
@@ -735,2 +740,54 @@ namePrefix?: string; | ||
} | ||
export interface GetSettlementTransactionsResponse { | ||
toExchange: ToExchangeTransaction[]; | ||
toCollateral: ToCollateralTransaction[]; | ||
} | ||
export interface ToExchangeTransaction { | ||
assetId: string; | ||
amount: string; | ||
dstAddress: string; | ||
dstTag: string; | ||
} | ||
export interface ToCollateralTransaction { | ||
assetId: string; | ||
amount: string; | ||
fee?: string; | ||
srcAddress?: string; | ||
srcTag?: string; | ||
} | ||
export interface AddCollateralTransactionRequest { | ||
transactionRequest: TransactionArguments; | ||
isSrcCollateral?: boolean; | ||
} | ||
export interface RemoveCollateralTransactionRequest { | ||
transactionRequest: TransactionArguments; | ||
isDstCollateral?: boolean; | ||
} | ||
export interface SettlementRequest { | ||
mainExchangeAccountId: string; | ||
} | ||
declare enum InitiatorType { | ||
EXCHANGE = "EXCHANGE", | ||
TRADER = "TRADER" | ||
} | ||
export interface InitiatedTransactions { | ||
toExchange: SettlementTransactionResponse[]; | ||
toCollateral: SettlementTransactionResponse[]; | ||
} | ||
export interface SettlementTransactionResponse { | ||
txId: string; | ||
status: TransactionStatus; | ||
} | ||
export declare enum ExchangeReply { | ||
REJECTED = "REJECTED", | ||
NOT_NEEDED = "NOT_NEEDED", | ||
FAILED = "FAILED" | ||
} | ||
export interface SettlementResponse { | ||
id: string; | ||
initiator: InitiatorType; | ||
exchangeReply?: ExchangeReply; | ||
fireblocksInitiatedTransactions?: InitiatedTransactions; | ||
exchangeRequestedTransactions?: GetSettlementTransactionsResponse; | ||
} | ||
export interface SetFeePayerConfiguration { | ||
@@ -871,2 +928,35 @@ feePayerAccountId: string; | ||
} | ||
export declare enum TokenLinkPermission { | ||
MINT = "MINT", | ||
BURN = "BURN" | ||
} | ||
export interface TokenLinkPermissionEntry { | ||
permission: TokenLinkPermission; | ||
vaultAccountId: string; | ||
} | ||
export interface LinkedTokenMetadata { | ||
assetId: string; | ||
name?: string; | ||
totalSupply?: string; | ||
holdersCount?: number; | ||
type?: string; | ||
contractAddress?: string; | ||
issuerAddress?: string; | ||
testnet?: boolean; | ||
blockchain?: string; | ||
} | ||
export interface TokenLink { | ||
id: string; | ||
assetId: string; | ||
assetMetadata?: LinkedTokenMetadata; | ||
permissions: TokenLinkPermissionEntry[]; | ||
} | ||
export interface IssueTokenRequest { | ||
symbol: string; | ||
name: string; | ||
blockchainId: string; | ||
ethContractAddress?: string; | ||
issuerAddress?: string; | ||
decimals: number; | ||
} | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OrderValues = exports.GetOwnedNFTsSortValues = exports.TimePeriod = exports.SettleResponseCode = exports.TransferTicketTermStatus = exports.TransferTicketStatus = exports.Web3ConnectionMethod = exports.Web3ConnectionType = exports.TransactionOperation = exports.VirtualType = exports.PeerType = exports.TransactionStatus = exports.TransactionOrder = exports.NetworkDestType = exports.NetworkScheme = exports.FeeLevel = exports.Web3ConnectionFeeLevel = exports.SigningAlgorithm = exports.VaultAssetActivationStatus = exports.VirtualAffiliation = void 0; | ||
exports.TokenLinkPermission = exports.OrderValues = exports.GetOwnedNFTsSortValues = exports.TimePeriod = exports.ExchangeReply = exports.SettleResponseCode = exports.TransferTicketTermStatus = exports.TransferTicketStatus = exports.Web3ConnectionMethod = exports.Web3ConnectionType = exports.TransactionOperation = exports.VirtualType = exports.PeerType = exports.TransactionStatus = exports.TransactionOrder = exports.NetworkDestType = exports.NetworkScheme = exports.FeeLevel = exports.Web3ConnectionFeeLevel = exports.SigningAlgorithm = exports.VaultAssetActivationStatus = exports.VirtualAffiliation = void 0; | ||
var VirtualAffiliation; | ||
@@ -137,2 +137,13 @@ (function (VirtualAffiliation) { | ||
})(SettleResponseCode = exports.SettleResponseCode || (exports.SettleResponseCode = {})); | ||
var InitiatorType; | ||
(function (InitiatorType) { | ||
InitiatorType["EXCHANGE"] = "EXCHANGE"; | ||
InitiatorType["TRADER"] = "TRADER"; | ||
})(InitiatorType || (InitiatorType = {})); | ||
var ExchangeReply; | ||
(function (ExchangeReply) { | ||
ExchangeReply["REJECTED"] = "REJECTED"; | ||
ExchangeReply["NOT_NEEDED"] = "NOT_NEEDED"; | ||
ExchangeReply["FAILED"] = "FAILED"; | ||
})(ExchangeReply = exports.ExchangeReply || (exports.ExchangeReply = {})); | ||
var TimePeriod; | ||
@@ -152,2 +163,7 @@ (function (TimePeriod) { | ||
})(OrderValues = exports.OrderValues || (exports.OrderValues = {})); | ||
var TokenLinkPermission; | ||
(function (TokenLinkPermission) { | ||
TokenLinkPermission["MINT"] = "MINT"; | ||
TokenLinkPermission["BURN"] = "BURN"; | ||
})(TokenLinkPermission = exports.TokenLinkPermission || (exports.TokenLinkPermission = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "fireblocks-sdk", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"main": "dist/src/fireblocks-sdk.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/src/fireblocks-sdk.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166704
3438