wallaby-cash 2.2.6 → 2.2.8
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.
- package/dist/index.cjs.js +12 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/transactions/index.d.ts +4 -2
- package/dist/package.json +1 -1
- package/dist/types/transactions.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -775,7 +775,7 @@ const MASTER_ENCRYPTION_KEY = '9fa9d3f3c77c20d3a50a08e5299644be29f6e6206ef3479fe
|
|
|
775
775
|
{ type: 'public-key', alg: PublicKeyCredentialAlgorithm.RS256 },
|
|
776
776
|
{ type: 'public-key', alg: PublicKeyCredentialAlgorithm.ES256 },
|
|
777
777
|
];
|
|
778
|
-
const currentPackageVersion = "2.2.
|
|
778
|
+
const currentPackageVersion = "2.2.8";
|
|
779
779
|
|
|
780
780
|
const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
|
781
781
|
|
|
@@ -10426,7 +10426,7 @@ class WalletDataService extends Base {
|
|
|
10426
10426
|
});
|
|
10427
10427
|
}
|
|
10428
10428
|
const response = await this.request(WalletRoutes.getMultiTokenBalances, {
|
|
10429
|
-
payload: { tokensAndAddressesList },
|
|
10429
|
+
payload: { assets: tokensAndAddressesList },
|
|
10430
10430
|
});
|
|
10431
10431
|
return response;
|
|
10432
10432
|
}
|
|
@@ -11273,9 +11273,10 @@ class Transactions extends Base {
|
|
|
11273
11273
|
* @param {string} reference
|
|
11274
11274
|
* @param {AuthenticationResponse} authenticationOptions
|
|
11275
11275
|
* @param {string} memo
|
|
11276
|
+
* @param {TransactionType} transactionType
|
|
11276
11277
|
* @returns {TransactionResponse}
|
|
11277
11278
|
*/
|
|
11278
|
-
async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, }) {
|
|
11279
|
+
async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, transactionType, }) {
|
|
11279
11280
|
try {
|
|
11280
11281
|
// Only attempt migration if we have password auth and V2 storage might be incomplete
|
|
11281
11282
|
if (this.deviceAuthType === AuthType.Password && authenticationOptions.password) {
|
|
@@ -11301,7 +11302,8 @@ class Transactions extends Base {
|
|
|
11301
11302
|
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedSeed: readyForTransportSeedPhrase, originAddress,
|
|
11302
11303
|
recipientAddress,
|
|
11303
11304
|
assetId,
|
|
11304
|
-
amount, reference: reference || v4(), memo
|
|
11305
|
+
amount, reference: reference || v4(), memo,
|
|
11306
|
+
transactionType }),
|
|
11305
11307
|
});
|
|
11306
11308
|
}
|
|
11307
11309
|
else if (hasShares) {
|
|
@@ -11309,7 +11311,8 @@ class Transactions extends Base {
|
|
|
11309
11311
|
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedShares: sharesEncryptedWithWallabyPubKey, originAddress,
|
|
11310
11312
|
recipientAddress,
|
|
11311
11313
|
assetId,
|
|
11312
|
-
amount, reference: reference || v4(), memo
|
|
11314
|
+
amount, reference: reference || v4(), memo,
|
|
11315
|
+
transactionType }),
|
|
11313
11316
|
});
|
|
11314
11317
|
}
|
|
11315
11318
|
else {
|
|
@@ -11338,10 +11341,11 @@ class Transactions extends Base {
|
|
|
11338
11341
|
* @param {string} suiObjectId
|
|
11339
11342
|
* @param {string} reference
|
|
11340
11343
|
* @param {string} memo
|
|
11344
|
+
* @param {TransactionType} transactionType
|
|
11341
11345
|
* @returns {CreateAllowanceResponse}
|
|
11342
11346
|
*
|
|
11343
11347
|
*/
|
|
11344
|
-
async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }) {
|
|
11348
|
+
async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, transactionType, }) {
|
|
11345
11349
|
try {
|
|
11346
11350
|
if (!suiObjectId && !contractAddress && !assetId && !assetSymbol && !chainName) {
|
|
11347
11351
|
throw new WallabyError({
|
|
@@ -11382,14 +11386,14 @@ class Transactions extends Base {
|
|
|
11382
11386
|
}
|
|
11383
11387
|
const payload = Object.assign({ message,
|
|
11384
11388
|
walletId,
|
|
11385
|
-
authenticationOptions,
|
|
11386
11389
|
signature, clientAuthPubKey: deviceAuthPublicKey, ownerAddress,
|
|
11387
11390
|
spenderAddress,
|
|
11388
11391
|
chainName,
|
|
11389
11392
|
assetSymbol,
|
|
11390
11393
|
amount,
|
|
11391
11394
|
assetId, contractAddress: contractAddress !== null && contractAddress !== void 0 ? contractAddress : suiObjectId, reference,
|
|
11392
|
-
memo
|
|
11395
|
+
memo,
|
|
11396
|
+
transactionType }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
|
|
11393
11397
|
const response = await this.request(TransactionsRoutes.createAllowance, {
|
|
11394
11398
|
payload,
|
|
11395
11399
|
});
|