@cityofzion/bs-multichain 1.1.15 → 1.3.0
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.
|
@@ -172,6 +172,8 @@ class SimpleSwapOrchestrator {
|
|
|
172
172
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_amountToUse_get).value ||
|
|
173
173
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_amountToReceive_get).value ||
|
|
174
174
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.hash ||
|
|
175
|
+
__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals === undefined ||
|
|
176
|
+
isNaN(__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals) ||
|
|
175
177
|
(__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToReceive_get).value.hasExtraId &&
|
|
176
178
|
(!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_extraIdToReceive_get).valid || !((_a = __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_extraIdToReceive_get).value) === null || _a === void 0 ? void 0 : _a.trim())))) {
|
|
177
179
|
throw new Error('Not all required fields are set');
|
|
@@ -199,8 +201,12 @@ class SimpleSwapOrchestrator {
|
|
|
199
201
|
{
|
|
200
202
|
amount: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_amountToUse_get).value,
|
|
201
203
|
receiverAddress: depositAddress,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
token: {
|
|
205
|
+
decimals: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals,
|
|
206
|
+
hash: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.hash,
|
|
207
|
+
name: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.name,
|
|
208
|
+
symbol: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.symbol,
|
|
209
|
+
},
|
|
204
210
|
},
|
|
205
211
|
],
|
|
206
212
|
});
|
|
@@ -221,7 +227,9 @@ class SimpleSwapOrchestrator {
|
|
|
221
227
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_addressToReceive_get).valid ||
|
|
222
228
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_amountToUse_get).value ||
|
|
223
229
|
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_amountToReceive_get).value ||
|
|
224
|
-
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.hash
|
|
230
|
+
!__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.hash ||
|
|
231
|
+
__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals === undefined ||
|
|
232
|
+
isNaN(__classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals)) {
|
|
225
233
|
throw new Error('Not all required fields are set');
|
|
226
234
|
}
|
|
227
235
|
const { blockchain } = __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_accountToUse_get).value;
|
|
@@ -236,8 +244,12 @@ class SimpleSwapOrchestrator {
|
|
|
236
244
|
receiverAddress: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToReceive_get).value.blockchain === blockchain
|
|
237
245
|
? __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_addressToReceive_get).value
|
|
238
246
|
: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_accountToUse_get).value.address,
|
|
239
|
-
|
|
240
|
-
|
|
247
|
+
token: {
|
|
248
|
+
decimals: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.decimals,
|
|
249
|
+
hash: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.hash,
|
|
250
|
+
name: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.name,
|
|
251
|
+
symbol: __classPrivateFieldGet(this, _SimpleSwapOrchestrator_instances, "a", _SimpleSwapOrchestrator_tokenToUse_get).value.symbol,
|
|
252
|
+
},
|
|
241
253
|
},
|
|
242
254
|
],
|
|
243
255
|
});
|
|
@@ -5,7 +5,7 @@ import { SdkErrorKey } from '@walletconnect/utils';
|
|
|
5
5
|
import { type TWalletKitHelperFilterSessionsParams, type TWalletKitHelperGetProposalDetailsParams, type TWalletKitHelperGetSessionDetailsParams, type TWalletKitHelperProcessRequestParams, type TWalletKitHelperProposalDetails, type TWalletKitHelperSessionDetails, type TWalletKitHelperGetProposalServicesParams } from './types';
|
|
6
6
|
export declare class WalletKitHelper {
|
|
7
7
|
static getProposalDetails<N extends string>({ address, proposal, service, }: TWalletKitHelperGetProposalDetailsParams<N>): TWalletKitHelperProposalDetails<N>;
|
|
8
|
-
static getProposalServices<N extends string>({ proposal, services }: TWalletKitHelperGetProposalServicesParams<N>): (IBlockchainService<N, string> & IBSWithWalletConnect)[];
|
|
8
|
+
static getProposalServices<N extends string>({ proposal, services }: TWalletKitHelperGetProposalServicesParams<N>): (IBlockchainService<N, string> & IBSWithWalletConnect<N>)[];
|
|
9
9
|
static getSessionDetails<N extends string>({ session, services, }: TWalletKitHelperGetSessionDetailsParams<N>): TWalletKitHelperSessionDetails<N>;
|
|
10
10
|
static getError(key: SdkErrorKey): {
|
|
11
11
|
message: string;
|
|
@@ -12,7 +12,7 @@ export type TWalletKitHelperGetProposalServicesParams<N extends string = string>
|
|
|
12
12
|
export type TWalletKitHelperProposalDetails<N extends string = string> = {
|
|
13
13
|
methods: string[];
|
|
14
14
|
approvedNamespaces: SessionTypes.Namespaces;
|
|
15
|
-
service: IBlockchainService<N> & IBSWithWalletConnect
|
|
15
|
+
service: IBlockchainService<N> & IBSWithWalletConnect<N>;
|
|
16
16
|
blockchain: N;
|
|
17
17
|
};
|
|
18
18
|
export type TWalletKitHelperGetSessionDetailsParams<N extends string = string> = {
|
|
@@ -22,7 +22,7 @@ export type TWalletKitHelperGetSessionDetailsParams<N extends string = string> =
|
|
|
22
22
|
export type TWalletKitHelperSessionDetails<N extends string = string> = {
|
|
23
23
|
address: string;
|
|
24
24
|
methods: string[];
|
|
25
|
-
service: IBlockchainService<N> & IBSWithWalletConnect
|
|
25
|
+
service: IBlockchainService<N> & IBSWithWalletConnect<N>;
|
|
26
26
|
blockchain: N;
|
|
27
27
|
};
|
|
28
28
|
export type TWalletKitHelperProcessRequestParams<N extends string = string> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-multichain",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"axios": "~1.12.2",
|
|
14
14
|
"@walletconnect/utils": "~2.21.9",
|
|
15
15
|
"@walletconnect/jsonrpc-utils": "~1.0.8",
|
|
16
|
-
"@cityofzion/blockchain-service": "1.
|
|
16
|
+
"@cityofzion/blockchain-service": "1.24.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "~24.5.2",
|
|
@@ -26,15 +26,16 @@
|
|
|
26
26
|
"ts-node": "~10.9.2",
|
|
27
27
|
"typescript": "~5.9.2",
|
|
28
28
|
"typed-emitter": "~2.1.0",
|
|
29
|
-
"@cityofzion/bs-neo3": "1.
|
|
30
|
-
"@cityofzion/bs-
|
|
31
|
-
"@cityofzion/bs-
|
|
29
|
+
"@cityofzion/bs-neo3": "1.19.0",
|
|
30
|
+
"@cityofzion/bs-ethereum": "2.17.0",
|
|
31
|
+
"@cityofzion/bs-neox": "1.9.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "rm -rf ./dist && tsc --project tsconfig.build.json",
|
|
34
|
+
"build": "rm -rf ./dist && npm run typecheck && tsc --project tsconfig.build.json",
|
|
35
35
|
"test": "jest -i --config jest.config.ts",
|
|
36
36
|
"lint": "eslint .",
|
|
37
37
|
"format": "eslint --fix",
|
|
38
|
-
"package": "npm run build && npm pack"
|
|
38
|
+
"package": "npm run build && npm pack",
|
|
39
|
+
"typecheck": "tsc --noEmit"
|
|
39
40
|
}
|
|
40
41
|
}
|