wallaby-cash 2.2.6 → 2.2.7
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 +11 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +11 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -6
- 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.cjs.js
CHANGED
|
@@ -802,7 +802,7 @@ const MASTER_ENCRYPTION_KEY = '9fa9d3f3c77c20d3a50a08e5299644be29f6e6206ef3479fe
|
|
|
802
802
|
{ type: 'public-key', alg: exports.PublicKeyCredentialAlgorithm.RS256 },
|
|
803
803
|
{ type: 'public-key', alg: exports.PublicKeyCredentialAlgorithm.ES256 },
|
|
804
804
|
];
|
|
805
|
-
const currentPackageVersion = "2.2.
|
|
805
|
+
const currentPackageVersion = "2.2.7";
|
|
806
806
|
|
|
807
807
|
const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
|
808
808
|
|
|
@@ -11300,9 +11300,10 @@ class Transactions extends Base {
|
|
|
11300
11300
|
* @param {string} reference
|
|
11301
11301
|
* @param {AuthenticationResponse} authenticationOptions
|
|
11302
11302
|
* @param {string} memo
|
|
11303
|
+
* @param {TransactionType} transactionType
|
|
11303
11304
|
* @returns {TransactionResponse}
|
|
11304
11305
|
*/
|
|
11305
|
-
async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, }) {
|
|
11306
|
+
async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, transactionType, }) {
|
|
11306
11307
|
try {
|
|
11307
11308
|
// Only attempt migration if we have password auth and V2 storage might be incomplete
|
|
11308
11309
|
if (this.deviceAuthType === exports.AuthType.Password && authenticationOptions.password) {
|
|
@@ -11328,7 +11329,8 @@ class Transactions extends Base {
|
|
|
11328
11329
|
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedSeed: readyForTransportSeedPhrase, originAddress,
|
|
11329
11330
|
recipientAddress,
|
|
11330
11331
|
assetId,
|
|
11331
|
-
amount, reference: reference || uuid.v4(), memo
|
|
11332
|
+
amount, reference: reference || uuid.v4(), memo,
|
|
11333
|
+
transactionType }),
|
|
11332
11334
|
});
|
|
11333
11335
|
}
|
|
11334
11336
|
else if (hasShares) {
|
|
@@ -11336,7 +11338,8 @@ class Transactions extends Base {
|
|
|
11336
11338
|
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedShares: sharesEncryptedWithWallabyPubKey, originAddress,
|
|
11337
11339
|
recipientAddress,
|
|
11338
11340
|
assetId,
|
|
11339
|
-
amount, reference: reference || uuid.v4(), memo
|
|
11341
|
+
amount, reference: reference || uuid.v4(), memo,
|
|
11342
|
+
transactionType }),
|
|
11340
11343
|
});
|
|
11341
11344
|
}
|
|
11342
11345
|
else {
|
|
@@ -11365,10 +11368,11 @@ class Transactions extends Base {
|
|
|
11365
11368
|
* @param {string} suiObjectId
|
|
11366
11369
|
* @param {string} reference
|
|
11367
11370
|
* @param {string} memo
|
|
11371
|
+
* @param {TransactionType} transactionType
|
|
11368
11372
|
* @returns {CreateAllowanceResponse}
|
|
11369
11373
|
*
|
|
11370
11374
|
*/
|
|
11371
|
-
async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }) {
|
|
11375
|
+
async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, transactionType, }) {
|
|
11372
11376
|
try {
|
|
11373
11377
|
if (!suiObjectId && !contractAddress && !assetId && !assetSymbol && !chainName) {
|
|
11374
11378
|
throw new WallabyError({
|
|
@@ -11416,7 +11420,8 @@ class Transactions extends Base {
|
|
|
11416
11420
|
assetSymbol,
|
|
11417
11421
|
amount,
|
|
11418
11422
|
assetId, contractAddress: contractAddress !== null && contractAddress !== void 0 ? contractAddress : suiObjectId, reference,
|
|
11419
|
-
memo
|
|
11423
|
+
memo,
|
|
11424
|
+
transactionType }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
|
|
11420
11425
|
const response = await this.request(TransactionsRoutes.createAllowance, {
|
|
11421
11426
|
payload,
|
|
11422
11427
|
});
|