@hashgraph/hedera-wallet-connect 1.3.7-canary.de9fb58.0 → 1.3.8-canary.0924bc2.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.
- package/dist/{src/lib → lib}/dapp/DAppSigner.d.ts +19 -2
- package/dist/{src/lib → lib}/dapp/DAppSigner.js +126 -30
- package/dist/lib/dapp/SessionNotFoundError.d.ts +3 -0
- package/dist/lib/dapp/SessionNotFoundError.js +6 -0
- package/dist/{src/lib → lib}/dapp/index.d.ts +10 -4
- package/dist/{src/lib → lib}/dapp/index.js +66 -43
- package/dist/{src/lib → lib}/shared/logger.d.ts +4 -2
- package/dist/{src/lib → lib}/shared/logger.js +3 -0
- package/dist/{src/lib → lib}/shared/utils.d.ts +8 -2
- package/dist/{src/lib → lib}/shared/utils.js +10 -2
- package/package.json +5 -4
- package/dist/test/_helpers.d.ts +0 -38
- package/dist/test/_helpers.js +0 -95
- package/dist/test/dapp/DAppConnector.test.d.ts +0 -1
- package/dist/test/dapp/DAppConnector.test.js +0 -232
- package/dist/test/dapp/DAppSigner.test.d.ts +0 -1
- package/dist/test/dapp/DAppSigner.test.js +0 -625
- package/dist/test/shared/logger.test.d.ts +0 -1
- package/dist/test/shared/logger.test.js +0 -129
- package/dist/test/utils.test.d.ts +0 -1
- package/dist/test/utils.test.js +0 -201
- package/dist/test/wallet/methods/wallet-executeTransaction.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-executeTransaction.test.js +0 -43
- package/dist/test/wallet/methods/wallet-getNodeAddresses.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-getNodeAddresses.test.js +0 -40
- package/dist/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-signAndExecuteQuery.test.js +0 -41
- package/dist/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-signAndExecuteTransaction.test.js +0 -48
- package/dist/test/wallet/methods/wallet-signMessage.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-signMessage.test.js +0 -60
- package/dist/test/wallet/methods/wallet-signTransaction.test.d.ts +0 -1
- package/dist/test/wallet/methods/wallet-signTransaction.test.js +0 -47
- package/dist/test/wallet/wallet-init.test.d.ts +0 -1
- package/dist/test/wallet/wallet-init.test.js +0 -53
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/lib → lib}/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/index.js +0 -0
- /package/dist/{src/lib → lib}/shared/chainIds.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/chainIds.js +0 -0
- /package/dist/{src/lib → lib}/shared/errors.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/errors.js +0 -0
- /package/dist/{src/lib → lib}/shared/events.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/events.js +0 -0
- /package/dist/{src/lib → lib}/shared/extensionController.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/extensionController.js +0 -0
- /package/dist/{src/lib → lib}/shared/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/index.js +0 -0
- /package/dist/{src/lib → lib}/shared/methods.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/methods.js +0 -0
- /package/dist/{src/lib → lib}/shared/payloads.d.ts +0 -0
- /package/dist/{src/lib → lib}/shared/payloads.js +0 -0
- /package/dist/{src/lib → lib}/wallet/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/wallet/index.js +0 -0
- /package/dist/{src/lib → lib}/wallet/provider.d.ts +0 -0
- /package/dist/{src/lib → lib}/wallet/provider.js +0 -0
- /package/dist/{src/lib → lib}/wallet/types.d.ts +0 -0
- /package/dist/{src/lib → lib}/wallet/types.js +0 -0
package/dist/test/_helpers.js
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* Hedera Wallet Connect
|
4
|
-
*
|
5
|
-
* Copyright (C) 2023 Hedera Hashgraph, LLC
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
*
|
19
|
-
*/
|
20
|
-
import fs from 'fs';
|
21
|
-
import path from 'path';
|
22
|
-
import { AccountId, TransactionId } from '@hashgraph/sdk';
|
23
|
-
export const projectId = 'ce06497abf4102004138a10edd29c921';
|
24
|
-
export const walletMetadata = {
|
25
|
-
name: 'Wallet Test',
|
26
|
-
url: 'https://dapp.hedera.app',
|
27
|
-
description: 'Hedera Hashgraph Wallet Example.',
|
28
|
-
icons: [
|
29
|
-
'https://cdn-assets-cloud.frontify.com/s3/frontify-cloud-files-us/eyJwYXRoIjoiZnJvbnRpZnlcL2FjY291bnRzXC8xNFwvMTQzMTI3XC9wcm9qZWN0c1wvMTgwMjE1XC9hc3NldHNcL2M3XC8zNDU0ODY3XC85ZjM1NDliYmE5MGQ2NDA0OGU0NzlhZTNiMzkyYzY4Yy0xNTY2NTkxOTQ4LmpwZyJ9:frontify:v_zJvQTCjtNploUvnSpk8S5NJB4R5eei6f7ERL2KSeQ?width=800',
|
30
|
-
],
|
31
|
-
};
|
32
|
-
export const dAppMetadata = {
|
33
|
-
name: 'dApp Test',
|
34
|
-
url: 'https://dapp.hedera.app',
|
35
|
-
description: 'Hedera Hashgraph dApp Example.',
|
36
|
-
icons: [
|
37
|
-
'https://cdn-assets-cloud.frontify.com/s3/frontify-cloud-files-us/eyJwYXRoIjoiZnJvbnRpZnlcL2FjY291bnRzXC8xNFwvMTQzMTI3XC9wcm9qZWN0c1wvMTgwMjE1XC9hc3NldHNcL2M3XC8zNDU0ODY3XC85ZjM1NDliYmE5MGQ2NDA0OGU0NzlhZTNiMzkyYzY4Yy0xNTY2NTkxOTQ4LmpwZyJ9:frontify:v_zJvQTCjtNploUvnSpk8S5NJB4R5eei6f7ERL2KSeQ?width=800',
|
38
|
-
],
|
39
|
-
};
|
40
|
-
export const requestId = 1;
|
41
|
-
export const requestTopic = 'test-topic';
|
42
|
-
export const defaultAccountNumber = 12345;
|
43
|
-
export const defaultNodeId = 3;
|
44
|
-
export const testUserAccountId = new AccountId(defaultAccountNumber);
|
45
|
-
export const testNodeAccountId = new AccountId(defaultNodeId);
|
46
|
-
/** Fixed to a specific timestamp */
|
47
|
-
export const testTransactionId = TransactionId.fromString(`0.0.${defaultAccountNumber}@1691705630.325343432`);
|
48
|
-
export function prepareTestTransaction(transaction, options) {
|
49
|
-
const selectedOptions = Object.assign({
|
50
|
-
// defaults
|
51
|
-
freeze: false, setNodeAccountIds: true, setTransactionId: true, operatorAccountId: defaultAccountNumber }, options);
|
52
|
-
if (selectedOptions.setNodeAccountIds) {
|
53
|
-
transaction.setNodeAccountIds([testNodeAccountId]);
|
54
|
-
}
|
55
|
-
if (selectedOptions.setTransactionId) {
|
56
|
-
let transactionId = testTransactionId;
|
57
|
-
if (selectedOptions.operatorAccountId &&
|
58
|
-
selectedOptions.operatorAccountId !== defaultAccountNumber) {
|
59
|
-
transactionId = TransactionId.generate(new AccountId(selectedOptions.operatorAccountId));
|
60
|
-
}
|
61
|
-
transaction.setTransactionId(transactionId);
|
62
|
-
}
|
63
|
-
if (selectedOptions.freeze) {
|
64
|
-
transaction.freeze();
|
65
|
-
}
|
66
|
-
return transaction;
|
67
|
-
}
|
68
|
-
export function prepareTestQuery(query, options) {
|
69
|
-
const selectedOptions = Object.assign({
|
70
|
-
// defaults
|
71
|
-
setNodeAccountIds: true }, options);
|
72
|
-
if (selectedOptions.setNodeAccountIds) {
|
73
|
-
query.setNodeAccountIds([testNodeAccountId]);
|
74
|
-
}
|
75
|
-
return query;
|
76
|
-
}
|
77
|
-
// from PrivateKey.generateECDSA().toStringDer()
|
78
|
-
export const testPrivateKeyECDSA = '3030020100300706052b8104000a042204203ce31ffad30d6db47c315bbea08232aad2266d8800a12aa3d8a812486e782759';
|
79
|
-
// from PrivateKey.generateED25519().toStringDer()
|
80
|
-
export const testPrivateKeyED25519 = '302e020100300506032b657004220420133eefea772add1f995c96bccf42b08b76daf67665f0c4c5ae308fae9275c142';
|
81
|
-
/** JSON fixture helpers */
|
82
|
-
const FIXTURES_PATH = 'test/_fixtures';
|
83
|
-
const filenameWithJsonExtension = (filename) => {
|
84
|
-
const file = /\.json$/.test(filename) ? filename : filename + '.json';
|
85
|
-
return path.join(FIXTURES_PATH, file);
|
86
|
-
};
|
87
|
-
export function useJsonFixture(filename) {
|
88
|
-
const filepath = filenameWithJsonExtension(filename);
|
89
|
-
const data = fs.readFileSync(filepath).toString();
|
90
|
-
return JSON.parse(data);
|
91
|
-
}
|
92
|
-
export function writeJsonFixture(filename, data) {
|
93
|
-
const filepath = filenameWithJsonExtension(filename);
|
94
|
-
fs.writeFileSync(filepath, JSON.stringify(data, null, 2));
|
95
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,232 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* Hedera Wallet Connect
|
4
|
-
*
|
5
|
-
* Copyright (C) 2023 Hedera Hashgraph, LLC
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
*
|
19
|
-
*/
|
20
|
-
import { AccountId, AccountInfoQuery, LedgerId, TopicCreateTransaction } from '@hashgraph/sdk';
|
21
|
-
import { DAppConnector, HederaJsonRpcMethod, HederaSessionEvent, queryToBase64String, transactionToBase64String, transactionToTransactionBody, transactionBodyToBase64String, DAppSigner, } from '../../src';
|
22
|
-
import { projectId, dAppMetadata, useJsonFixture, prepareTestTransaction, testUserAccountId, } from '../_helpers';
|
23
|
-
import Client, { SignClient } from '@walletconnect/sign-client';
|
24
|
-
describe('DAppConnector', () => {
|
25
|
-
let connector;
|
26
|
-
const fakeSession = useJsonFixture('fakeSession');
|
27
|
-
beforeEach(() => {
|
28
|
-
connector = new DAppConnector(dAppMetadata, LedgerId.TESTNET, projectId);
|
29
|
-
});
|
30
|
-
afterEach(() => {
|
31
|
-
global.gc && global.gc();
|
32
|
-
});
|
33
|
-
describe('constructor', () => {
|
34
|
-
it('should create a valid class object', () => {
|
35
|
-
const methods = ['hedera_testMethod', 'any_testMethod'];
|
36
|
-
const events = [HederaSessionEvent.ChainChanged, HederaSessionEvent.AccountsChanged];
|
37
|
-
connector = new DAppConnector(dAppMetadata, LedgerId.TESTNET, projectId, methods, events);
|
38
|
-
expect(connector.dAppMetadata).toBe(dAppMetadata);
|
39
|
-
expect(connector.network).toBe(LedgerId.TESTNET);
|
40
|
-
expect(connector.projectId).toBe(projectId);
|
41
|
-
expect(connector.supportedMethods).toEqual(methods);
|
42
|
-
expect(connector.supportedEvents).toEqual(events);
|
43
|
-
});
|
44
|
-
it('should create a valid class object without passing of methods and events', () => {
|
45
|
-
connector = new DAppConnector(dAppMetadata, LedgerId.TESTNET, projectId);
|
46
|
-
expect(connector.dAppMetadata).toBe(dAppMetadata);
|
47
|
-
expect(connector.network).toBe(LedgerId.TESTNET);
|
48
|
-
expect(connector.projectId).toBe(projectId);
|
49
|
-
expect(connector.supportedMethods).toEqual(Object.values(HederaJsonRpcMethod));
|
50
|
-
expect(connector.supportedEvents).toEqual([]);
|
51
|
-
});
|
52
|
-
});
|
53
|
-
describe('init', () => {
|
54
|
-
it('should init SignClient correctly', async () => {
|
55
|
-
var _a, _b, _c;
|
56
|
-
await connector.init({ logger: 'error' });
|
57
|
-
expect(connector.walletConnectClient).toBeInstanceOf(Client);
|
58
|
-
expect((_a = connector.walletConnectClient) === null || _a === void 0 ? void 0 : _a.metadata).toBe(dAppMetadata);
|
59
|
-
expect((_b = connector.walletConnectClient) === null || _b === void 0 ? void 0 : _b.core.projectId).toBe(projectId);
|
60
|
-
expect((_c = connector.walletConnectClient) === null || _c === void 0 ? void 0 : _c.core.relayUrl).toBe('wss://relay.walletconnect.com');
|
61
|
-
});
|
62
|
-
it('should create signers if there are persisted sessions', async () => {
|
63
|
-
const mockInit = jest.spyOn(connector, 'init');
|
64
|
-
const mockSignClient = new SignClient({
|
65
|
-
logger: 'error',
|
66
|
-
relayUrl: 'wss://relay.walletconnect.com',
|
67
|
-
projectId: projectId,
|
68
|
-
metadata: dAppMetadata,
|
69
|
-
});
|
70
|
-
mockInit.mockImplementation(async () => {
|
71
|
-
connector.signers = [
|
72
|
-
new DAppSigner(testUserAccountId, mockSignClient, fakeSession.topic, LedgerId.TESTNET),
|
73
|
-
];
|
74
|
-
});
|
75
|
-
await connector.init({ logger: 'error' });
|
76
|
-
expect(connector.signers.length).toBeGreaterThan(0);
|
77
|
-
mockInit.mockRestore();
|
78
|
-
});
|
79
|
-
});
|
80
|
-
describe('disconnect', () => {
|
81
|
-
it('should disconnect Client from topic', async () => {
|
82
|
-
connector.walletConnectClient = new SignClient({
|
83
|
-
logger: 'error',
|
84
|
-
relayUrl: 'wss://relay.walletconnect.com',
|
85
|
-
projectId: projectId,
|
86
|
-
metadata: dAppMetadata,
|
87
|
-
});
|
88
|
-
const walletConnectDisconnectSpy = jest.spyOn(connector.walletConnectClient, 'disconnect');
|
89
|
-
walletConnectDisconnectSpy.mockImplementation(async () => { });
|
90
|
-
connector.disconnect(fakeSession.topic);
|
91
|
-
expect(walletConnectDisconnectSpy).toHaveBeenCalled();
|
92
|
-
expect(walletConnectDisconnectSpy).toHaveBeenCalledTimes(1);
|
93
|
-
expect(walletConnectDisconnectSpy).toHaveBeenCalledWith(expect.objectContaining({ topic: fakeSession.topic }));
|
94
|
-
walletConnectDisconnectSpy.mockRestore();
|
95
|
-
});
|
96
|
-
});
|
97
|
-
describe('requests', () => {
|
98
|
-
let lastSignerRequestMock;
|
99
|
-
// @ts-ignore
|
100
|
-
let mockSignClient;
|
101
|
-
beforeEach(async () => {
|
102
|
-
mockSignClient = new SignClient({
|
103
|
-
logger: 'error',
|
104
|
-
relayUrl: 'wss://relay.walletconnect.com',
|
105
|
-
projectId: projectId,
|
106
|
-
metadata: dAppMetadata,
|
107
|
-
});
|
108
|
-
connector.signers = [
|
109
|
-
new DAppSigner(testUserAccountId, mockSignClient, fakeSession.topic, LedgerId.TESTNET),
|
110
|
-
];
|
111
|
-
lastSignerRequestMock = jest.spyOn(connector.signers[0], 'request');
|
112
|
-
lastSignerRequestMock.mockImplementation(() => { });
|
113
|
-
});
|
114
|
-
afterEach(() => {
|
115
|
-
if (lastSignerRequestMock) {
|
116
|
-
lastSignerRequestMock.mockRestore();
|
117
|
-
}
|
118
|
-
});
|
119
|
-
describe('getNodeAddresses', () => {
|
120
|
-
it('should throw an error if there is no active signer', async () => {
|
121
|
-
connector.signers = [];
|
122
|
-
await expect(connector.getNodeAddresses()).rejects.toThrow('There is no active session. Connect to the wallet at first.');
|
123
|
-
});
|
124
|
-
it('should invoke last signer request with correct params', async () => {
|
125
|
-
await connector.getNodeAddresses();
|
126
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
127
|
-
method: HederaJsonRpcMethod.GetNodeAddresses,
|
128
|
-
params: undefined,
|
129
|
-
});
|
130
|
-
});
|
131
|
-
});
|
132
|
-
describe('signMessage', () => {
|
133
|
-
const params = {
|
134
|
-
message: 'test message',
|
135
|
-
signerAccountId: `hedera:testnet:${testUserAccountId.toString()}`,
|
136
|
-
};
|
137
|
-
it('should throw an error if there are no signers', async () => {
|
138
|
-
connector.signers = [];
|
139
|
-
await expect(connector.signMessage(params)).rejects.toThrow('Signer not found for account ID: hedera:testnet:0.0.12345. Did you use the correct format? e.g hedera:<network>:<address>');
|
140
|
-
});
|
141
|
-
it('should invoke last signer request with correct params', async () => {
|
142
|
-
await connector.signMessage(params);
|
143
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
144
|
-
method: HederaJsonRpcMethod.SignMessage,
|
145
|
-
params,
|
146
|
-
});
|
147
|
-
});
|
148
|
-
});
|
149
|
-
describe('executeTransaction', () => {
|
150
|
-
const transaction = prepareTestTransaction(new TopicCreateTransaction(), { freeze: true });
|
151
|
-
const params = {
|
152
|
-
transactionList: transactionToBase64String(transaction),
|
153
|
-
};
|
154
|
-
it('should throw an error if there are no signers', async () => {
|
155
|
-
connector.signers = [];
|
156
|
-
await expect(connector.executeTransaction(params)).rejects.toThrow('There is no active session. Connect to the wallet at first.');
|
157
|
-
});
|
158
|
-
it('should invoke last signer request with correct params', async () => {
|
159
|
-
await connector.executeTransaction(params);
|
160
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
161
|
-
method: HederaJsonRpcMethod.ExecuteTransaction,
|
162
|
-
params,
|
163
|
-
});
|
164
|
-
});
|
165
|
-
});
|
166
|
-
describe('signAndExecuteQuery', () => {
|
167
|
-
const query = new AccountInfoQuery().setAccountId(testUserAccountId.toString());
|
168
|
-
const params = {
|
169
|
-
signerAccountId: testUserAccountId.toString(),
|
170
|
-
query: queryToBase64String(query),
|
171
|
-
};
|
172
|
-
it('should throw an error if there is no any signer', async () => {
|
173
|
-
connector.signers = [];
|
174
|
-
await expect(connector.signAndExecuteQuery(params)).rejects.toThrow('Signer not found for account ID: 0.0.12345. Did you use the correct format? e.g hedera:<network>:<address>');
|
175
|
-
});
|
176
|
-
it('should invoke last signer request with correct params', async () => {
|
177
|
-
await connector.signAndExecuteQuery(params);
|
178
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
179
|
-
method: HederaJsonRpcMethod.SignAndExecuteQuery,
|
180
|
-
params,
|
181
|
-
});
|
182
|
-
});
|
183
|
-
});
|
184
|
-
describe('signAndExecuteTransaction', () => {
|
185
|
-
const transaction = prepareTestTransaction(new TopicCreateTransaction(), { freeze: true });
|
186
|
-
const params = {
|
187
|
-
signerAccountId: testUserAccountId.toString(),
|
188
|
-
transactionList: transactionToBase64String(transaction),
|
189
|
-
};
|
190
|
-
it('should throw an error if there is no any signer', async () => {
|
191
|
-
connector.signers = [];
|
192
|
-
await expect(connector.signAndExecuteTransaction(params)).rejects.toThrow('Signer not found for account ID: 0.0.12345. Did you use the correct format? e.g hedera:<network>:<address>');
|
193
|
-
});
|
194
|
-
it('should invoke last signer request with correct params', async () => {
|
195
|
-
await connector.signAndExecuteTransaction(params);
|
196
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
197
|
-
method: HederaJsonRpcMethod.SignAndExecuteTransaction,
|
198
|
-
params,
|
199
|
-
});
|
200
|
-
});
|
201
|
-
});
|
202
|
-
describe('signTransaction', () => {
|
203
|
-
const transaction = prepareTestTransaction(new TopicCreateTransaction(), { freeze: true });
|
204
|
-
const params = {
|
205
|
-
signerAccountId: testUserAccountId.toString(),
|
206
|
-
transactionBody: transactionBodyToBase64String(transactionToTransactionBody(transaction, AccountId.fromString('0.0.3'))),
|
207
|
-
};
|
208
|
-
it('should throw an error if there is no any signer', async () => {
|
209
|
-
connector.signers = [];
|
210
|
-
await expect(connector.signTransaction(params)).rejects.toThrow('Signer not found for account ID: 0.0.12345. Did you use the correct format? e.g hedera:<network>:<address>');
|
211
|
-
});
|
212
|
-
it('should invoke last signer request with correct params', async () => {
|
213
|
-
await connector.signTransaction(params);
|
214
|
-
expect(lastSignerRequestMock).toHaveBeenCalledWith({
|
215
|
-
method: HederaJsonRpcMethod.SignTransaction,
|
216
|
-
params,
|
217
|
-
});
|
218
|
-
});
|
219
|
-
});
|
220
|
-
});
|
221
|
-
// describe('connect', () => {
|
222
|
-
// it('should establish connection and create session', async () => {
|
223
|
-
// connector = new DAppConnector(appMetadata, LedgerId.TESTNET, PROJECT_ID)
|
224
|
-
// await connector.init()
|
225
|
-
// expect(connector.walletConnectClient).not.toBeNull()
|
226
|
-
// await connector.connect((pairing) => {
|
227
|
-
// console.log('PairingString: ', pairing)
|
228
|
-
// })
|
229
|
-
// expect(connector.walletConnectClient?.session.getAll()).toHaveLength(1)
|
230
|
-
// }, 60_000)
|
231
|
-
// })
|
232
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|