@riocrypto/common-server 1.0.1109 → 1.0.1110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ declare class FireblocksClient {
14
14
  createVault(userId: string, name: string, type: "transactional" | "managed"): Promise<string>;
15
15
  createWallet(vaultId: string, crypto: Crypto): Promise<string>;
16
16
  internalTransfer(crypto: Crypto, sourceVaultId: string, destinationVaultId: string, amountCrypto: number, notes?: string): Promise<string>;
17
+ externalTransfer(crypto: Crypto, sourceVaultId: string, destinationAddress: string, amountCrypto: number, notes?: string): Promise<string>;
17
18
  sweep(vaultId: string, assetId: string, amount: number): Promise<void>;
18
19
  }
19
20
  export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
@@ -157,6 +157,27 @@ class FireblocksClient {
157
157
  return response.id;
158
158
  });
159
159
  }
160
+ externalTransfer(crypto, sourceVaultId, destinationAddress, amountCrypto, notes) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const response = yield this.fireblocks.createTransaction({
163
+ assetId: crypto,
164
+ source: {
165
+ type: fireblocks_sdk_1.PeerType.VAULT_ACCOUNT,
166
+ id: sourceVaultId,
167
+ },
168
+ destination: {
169
+ type: fireblocks_sdk_1.PeerType.ONE_TIME_ADDRESS,
170
+ oneTimeAddress: {
171
+ address: destinationAddress,
172
+ },
173
+ },
174
+ amount: amountCrypto,
175
+ operation: fireblocks_sdk_1.TransactionOperation.TRANSFER,
176
+ note: notes,
177
+ });
178
+ return response.id;
179
+ });
180
+ }
160
181
  sweep(vaultId, assetId, amount) {
161
182
  return __awaiter(this, void 0, void 0, function* () {
162
183
  yield this.fireblocks.createTransaction({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1109",
3
+ "version": "1.0.1110",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.947",
29
+ "@riocrypto/common": "^1.0.951",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",