@canton-network/dapp-sdk 1.1.0 → 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.
- package/README.md +17 -36
- package/dist/adapter/index.d.ts +0 -1
- package/dist/adapter/index.d.ts.map +1 -1
- package/dist/adapter/walletconnect-adapter.d.ts +51 -0
- package/dist/adapter/walletconnect-adapter.d.ts.map +1 -1
- package/dist/client.d.ts +5 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/dapp-api/rpc-gen/index.d.ts +3 -0
- package/dist/dapp-api/rpc-gen/index.d.ts.map +1 -1
- package/dist/dapp-api/rpc-gen/typings.d.ts +96 -7
- package/dist/dapp-api/rpc-gen/typings.d.ts.map +1 -1
- package/dist/index.cjs +167 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +169 -118
- package/dist/index.js.map +1 -1
- package/dist/integration-test/mock-extension/mock-extension.d.ts +15 -0
- package/dist/integration-test/mock-extension/mock-extension.d.ts.map +1 -0
- package/dist/integration-test/mock-remote/http-server.d.ts +6 -0
- package/dist/integration-test/mock-remote/http-server.d.ts.map +1 -0
- package/dist/integration-test/mock-remote/json-rpc-handlers.d.ts +18 -0
- package/dist/integration-test/mock-remote/json-rpc-handlers.d.ts.map +1 -0
- package/dist/sdk-controller.d.ts +1 -0
- package/dist/sdk-controller.d.ts.map +1 -1
- package/dist/sdk.d.ts +7 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/util.d.ts +7 -0
- package/dist/util.d.ts.map +1 -1
- package/package.json +27 -21
- package/dist/adapter/injected-adapter.d.ts +0 -26
- package/dist/adapter/injected-adapter.d.ts.map +0 -1
- package/dist/injected-discovery.d.ts +0 -9
- package/dist/injected-discovery.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var coreWalletUiComponents = require('@canton-network/core-wallet-ui-components'
|
|
|
6
6
|
var coreWalletDiscovery = require('@canton-network/core-wallet-discovery');
|
|
7
7
|
var coreRpcTransport = require('@canton-network/core-rpc-transport');
|
|
8
8
|
var SignClient = require('@walletconnect/sign-client');
|
|
9
|
+
var uuid = require('uuid');
|
|
9
10
|
var coreWalletDappRpcClient = require('@canton-network/core-wallet-dapp-rpc-client');
|
|
10
11
|
|
|
11
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -87,6 +88,31 @@ var clearAllLocalState = ({
|
|
|
87
88
|
coreWalletUiComponents.popup.close();
|
|
88
89
|
}
|
|
89
90
|
};
|
|
91
|
+
var composeSIWXMessage = (params) => {
|
|
92
|
+
{
|
|
93
|
+
const networkName = "Canton";
|
|
94
|
+
return [
|
|
95
|
+
`${params.domain} wants you to sign in with your ${networkName} account:`,
|
|
96
|
+
params.accountAddress,
|
|
97
|
+
params.statement ? `
|
|
98
|
+
${params.statement}
|
|
99
|
+
` : "",
|
|
100
|
+
`URI: ${params.uri}`,
|
|
101
|
+
`Version: ${params.version}`,
|
|
102
|
+
`Chain ID: ${params.chainId}`,
|
|
103
|
+
`Nonce: ${params.nonce}`,
|
|
104
|
+
params.issuedAt && `Issued At: ${params.issuedAt}`,
|
|
105
|
+
params.expirationTime && `Expiration Time: ${params.expirationTime}`,
|
|
106
|
+
params.notBefore && `Not Before: ${params.notBefore}`,
|
|
107
|
+
params.requestId && `Request ID: ${params.requestId}`,
|
|
108
|
+
params.resources?.length && params.resources.reduce(
|
|
109
|
+
(acc, resource) => `${acc}
|
|
110
|
+
- ${resource}`,
|
|
111
|
+
"Resources:"
|
|
112
|
+
)
|
|
113
|
+
].filter((line) => typeof line === "string").join("\n").trim();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
90
116
|
|
|
91
117
|
// src/client.ts
|
|
92
118
|
var DappClient = class {
|
|
@@ -95,9 +121,6 @@ var DappClient = class {
|
|
|
95
121
|
__publicField(this, "options");
|
|
96
122
|
this.provider = provider;
|
|
97
123
|
this.options = options;
|
|
98
|
-
if (options.injectGlobal !== false) {
|
|
99
|
-
coreProviderDapp.injectProvider(provider);
|
|
100
|
-
}
|
|
101
124
|
}
|
|
102
125
|
// ── Provider access ───────────────────────────────────
|
|
103
126
|
getProvider() {
|
|
@@ -122,6 +145,9 @@ var DappClient = class {
|
|
|
122
145
|
params
|
|
123
146
|
});
|
|
124
147
|
}
|
|
148
|
+
async signMessage(params) {
|
|
149
|
+
return this.provider.request({ method: "signMessage", params });
|
|
150
|
+
}
|
|
125
151
|
async ledgerApi(params) {
|
|
126
152
|
return this.provider.request({ method: "ledgerApi", params });
|
|
127
153
|
}
|
|
@@ -138,6 +164,9 @@ var DappClient = class {
|
|
|
138
164
|
onTxChanged(listener) {
|
|
139
165
|
this.provider.on("txChanged", listener);
|
|
140
166
|
}
|
|
167
|
+
onMessageSignature(listener) {
|
|
168
|
+
this.provider.on("messageSignature", listener);
|
|
169
|
+
}
|
|
141
170
|
removeOnStatusChanged(listener) {
|
|
142
171
|
this.provider.removeListener("statusChanged", listener);
|
|
143
172
|
}
|
|
@@ -153,6 +182,12 @@ var DappClient = class {
|
|
|
153
182
|
removeOnTxChanged(listener) {
|
|
154
183
|
this.provider.removeListener("txChanged", listener);
|
|
155
184
|
}
|
|
185
|
+
removeOnMessageSignature(listener) {
|
|
186
|
+
this.provider.removeListener(
|
|
187
|
+
"messageSignature",
|
|
188
|
+
listener
|
|
189
|
+
);
|
|
190
|
+
}
|
|
156
191
|
// ── Open wallet UI ─────────────────────────────────────
|
|
157
192
|
async open() {
|
|
158
193
|
const statusResult = await this.status();
|
|
@@ -266,52 +301,6 @@ var ExtensionAdapter = class {
|
|
|
266
301
|
}
|
|
267
302
|
};
|
|
268
303
|
|
|
269
|
-
// src/adapter/injected-adapter.ts
|
|
270
|
-
var InjectedAdapter = class {
|
|
271
|
-
constructor(config) {
|
|
272
|
-
__publicField(this, "providerId");
|
|
273
|
-
__publicField(this, "name");
|
|
274
|
-
__publicField(this, "type", "browser");
|
|
275
|
-
__publicField(this, "icon");
|
|
276
|
-
__publicField(this, "providerInstance");
|
|
277
|
-
__publicField(this, "description");
|
|
278
|
-
this.providerId = `browser:${config.id}`;
|
|
279
|
-
this.name = config.name;
|
|
280
|
-
this.icon = config.icon;
|
|
281
|
-
this.providerInstance = config.provider;
|
|
282
|
-
this.description = config.description;
|
|
283
|
-
}
|
|
284
|
-
getInfo() {
|
|
285
|
-
return {
|
|
286
|
-
providerId: this.providerId,
|
|
287
|
-
name: this.name,
|
|
288
|
-
type: this.type,
|
|
289
|
-
description: this.description ?? "Connect via an injected CIP-103 provider (window namespace)",
|
|
290
|
-
icon: this.icon
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
async detect() {
|
|
294
|
-
return true;
|
|
295
|
-
}
|
|
296
|
-
provider() {
|
|
297
|
-
return this.providerInstance;
|
|
298
|
-
}
|
|
299
|
-
teardown() {
|
|
300
|
-
}
|
|
301
|
-
async restore() {
|
|
302
|
-
try {
|
|
303
|
-
const status2 = await this.providerInstance.request({
|
|
304
|
-
method: "status"
|
|
305
|
-
});
|
|
306
|
-
if (status2.connection.isConnected) {
|
|
307
|
-
return this.providerInstance;
|
|
308
|
-
}
|
|
309
|
-
} catch {
|
|
310
|
-
}
|
|
311
|
-
return null;
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
|
|
315
304
|
// src/dapp-api/rpc-gen/index.ts
|
|
316
305
|
function buildController(methods) {
|
|
317
306
|
return {
|
|
@@ -327,7 +316,8 @@ function buildController(methods) {
|
|
|
327
316
|
accountsChanged: methods.accountsChanged,
|
|
328
317
|
getPrimaryAccount: methods.getPrimaryAccount,
|
|
329
318
|
listAccounts: methods.listAccounts,
|
|
330
|
-
txChanged: methods.txChanged
|
|
319
|
+
txChanged: methods.txChanged,
|
|
320
|
+
messageSignature: methods.messageSignature
|
|
331
321
|
};
|
|
332
322
|
}
|
|
333
323
|
var rpc_gen_default = buildController;
|
|
@@ -453,13 +443,51 @@ var dappSDKController = (provider) => rpc_gen_default({
|
|
|
453
443
|
getActiveNetwork: async () => provider.request({
|
|
454
444
|
method: "getActiveNetwork"
|
|
455
445
|
}),
|
|
456
|
-
signMessage: async (params) =>
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
446
|
+
signMessage: async (params) => {
|
|
447
|
+
const response = await provider.request({
|
|
448
|
+
method: "signMessage",
|
|
449
|
+
params
|
|
450
|
+
});
|
|
451
|
+
const { userUrl } = response;
|
|
452
|
+
coreWalletUiComponents.popup.open(userUrl);
|
|
453
|
+
const messageId = new URL(userUrl).searchParams.get("messageId");
|
|
454
|
+
if (!messageId) {
|
|
455
|
+
throw new Error(
|
|
456
|
+
"Remote signMessage userUrl is missing messageId query param"
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
return await new Promise((resolve, reject) => {
|
|
460
|
+
const timeout = withTimeout(
|
|
461
|
+
reject,
|
|
462
|
+
"Timed out waiting for message signing approval"
|
|
463
|
+
);
|
|
464
|
+
const listener = (event) => {
|
|
465
|
+
if (event.messageId !== messageId) return;
|
|
466
|
+
if (event.status === "pending") return;
|
|
467
|
+
provider.removeListener("messageSignature", listener);
|
|
468
|
+
clearTimeout(timeout);
|
|
469
|
+
if (event.status === "failed") {
|
|
470
|
+
reject({
|
|
471
|
+
status: "error",
|
|
472
|
+
error: 3 /* TransactionFailed */,
|
|
473
|
+
details: `Message signing failed for messageId ${event.messageId}.`
|
|
474
|
+
});
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
resolve({ signature: event.signature });
|
|
478
|
+
};
|
|
479
|
+
provider.on(
|
|
480
|
+
"messageSignature",
|
|
481
|
+
listener
|
|
482
|
+
);
|
|
483
|
+
});
|
|
484
|
+
},
|
|
460
485
|
getPrimaryAccount: async () => provider.request({
|
|
461
486
|
method: "getPrimaryAccount"
|
|
462
|
-
})
|
|
487
|
+
}),
|
|
488
|
+
messageSignature: function() {
|
|
489
|
+
throw new Error("Only for events.");
|
|
490
|
+
}
|
|
463
491
|
});
|
|
464
492
|
|
|
465
493
|
// src/adapter/remote-adapter.ts
|
|
@@ -621,6 +649,8 @@ var WalletConnectAdapter = class _WalletConnectAdapter {
|
|
|
621
649
|
__publicField(this, "chainId");
|
|
622
650
|
__publicField(this, "metadata");
|
|
623
651
|
__publicField(this, "onUri");
|
|
652
|
+
__publicField(this, "onSignInWithCanton");
|
|
653
|
+
__publicField(this, "signInWithCanton");
|
|
624
654
|
__publicField(this, "signClient", null);
|
|
625
655
|
__publicField(this, "session", null);
|
|
626
656
|
__publicField(this, "initPromise", null);
|
|
@@ -628,9 +658,11 @@ var WalletConnectAdapter = class _WalletConnectAdapter {
|
|
|
628
658
|
__publicField(this, "listeners", {});
|
|
629
659
|
__publicField(this, "eventBuffer", /* @__PURE__ */ new Map());
|
|
630
660
|
this.projectId = config.projectId;
|
|
661
|
+
this.signInWithCanton = config.signInWithCanton;
|
|
631
662
|
this.chainId = config.chainId ?? "canton:devnet";
|
|
632
663
|
this.metadata = config.metadata;
|
|
633
664
|
this.onUri = config.onUri;
|
|
665
|
+
this.onSignInWithCanton = config.onSignInWithCanton;
|
|
634
666
|
}
|
|
635
667
|
static create(config) {
|
|
636
668
|
return new _WalletConnectAdapter(config);
|
|
@@ -837,6 +869,46 @@ var WalletConnectAdapter = class _WalletConnectAdapter {
|
|
|
837
869
|
}
|
|
838
870
|
this.session = await approval();
|
|
839
871
|
this.setupSessionEvents();
|
|
872
|
+
if (this.signInWithCanton) {
|
|
873
|
+
const nonce = this.signInWithCanton.nonce || uuid.v4();
|
|
874
|
+
try {
|
|
875
|
+
const account = this.session?.namespaces?.canton?.accounts?.[0];
|
|
876
|
+
const address = decodeURIComponent(account?.split(":")[2]);
|
|
877
|
+
const chainId = account?.split(":")[1] ?? this.chainId;
|
|
878
|
+
const message = composeSIWXMessage({
|
|
879
|
+
...this.signInWithCanton,
|
|
880
|
+
accountAddress: address,
|
|
881
|
+
chainId
|
|
882
|
+
});
|
|
883
|
+
const result = await this.walletConnectRequest("signMessage", {
|
|
884
|
+
message
|
|
885
|
+
});
|
|
886
|
+
this.onSignInWithCanton?.({
|
|
887
|
+
requestId: this.signInWithCanton.requestId,
|
|
888
|
+
nonce,
|
|
889
|
+
account,
|
|
890
|
+
chainId,
|
|
891
|
+
message,
|
|
892
|
+
signature: result.signature,
|
|
893
|
+
publicKey: result.publicKey
|
|
894
|
+
});
|
|
895
|
+
} catch (error) {
|
|
896
|
+
const err = error;
|
|
897
|
+
this.onSignInWithCanton?.({
|
|
898
|
+
requestId: this.signInWithCanton.requestId,
|
|
899
|
+
nonce,
|
|
900
|
+
account: "",
|
|
901
|
+
chainId: "",
|
|
902
|
+
message: "",
|
|
903
|
+
publicKey: "",
|
|
904
|
+
signature: "",
|
|
905
|
+
error: {
|
|
906
|
+
message: err.message,
|
|
907
|
+
code: -32603
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
}
|
|
840
912
|
}
|
|
841
913
|
async showUriInPopup(uri) {
|
|
842
914
|
try {
|
|
@@ -866,47 +938,22 @@ var gateways_default = [
|
|
|
866
938
|
}
|
|
867
939
|
];
|
|
868
940
|
|
|
869
|
-
// src/
|
|
870
|
-
var
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
for (const root of roots) {
|
|
882
|
-
const candidate = win[root];
|
|
883
|
-
if (candidate === void 0 || candidate === null) continue;
|
|
884
|
-
if (isProviderLike(candidate) && !seen.has(candidate)) {
|
|
885
|
-
seen.add(candidate);
|
|
886
|
-
discovered.push({
|
|
887
|
-
id: root,
|
|
888
|
-
provider: candidate,
|
|
889
|
-
sourceRoot: root
|
|
890
|
-
});
|
|
891
|
-
continue;
|
|
892
|
-
}
|
|
893
|
-
if (typeof candidate === "object") {
|
|
894
|
-
for (const [key, value] of Object.entries(
|
|
895
|
-
candidate
|
|
896
|
-
)) {
|
|
897
|
-
if (isProviderLike(value) && !seen.has(value)) {
|
|
898
|
-
seen.add(value);
|
|
899
|
-
discovered.push({
|
|
900
|
-
id: `${root}.${key}`,
|
|
901
|
-
provider: value,
|
|
902
|
-
sourceRoot: root
|
|
903
|
-
});
|
|
904
|
-
}
|
|
941
|
+
// src/wallets.json
|
|
942
|
+
var wallets_default = [
|
|
943
|
+
{
|
|
944
|
+
name: "Send Connect",
|
|
945
|
+
type: "browser",
|
|
946
|
+
providerId: "browser:ext:ldmohiccoioolenadmogclhoklmanpgi",
|
|
947
|
+
description: "Connect via a browser extension wallet",
|
|
948
|
+
icon: "https://info.send.it/img/favicon.svg",
|
|
949
|
+
installUrls: [
|
|
950
|
+
{
|
|
951
|
+
platform: "chrome",
|
|
952
|
+
url: "https://chromewebstore.google.com/detail/send-connect/ldmohiccoioolenadmogclhoklmanpgi"
|
|
905
953
|
}
|
|
906
|
-
|
|
954
|
+
]
|
|
907
955
|
}
|
|
908
|
-
|
|
909
|
-
}
|
|
956
|
+
];
|
|
910
957
|
async function requestAnnouncedProviders(options) {
|
|
911
958
|
if (typeof window === "undefined") return [];
|
|
912
959
|
const timeoutMs = 300;
|
|
@@ -936,10 +983,14 @@ async function requestAnnouncedProviders(options) {
|
|
|
936
983
|
}
|
|
937
984
|
|
|
938
985
|
// src/sdk.ts
|
|
986
|
+
function defaultTrue(b) {
|
|
987
|
+
return b === void 0 ? true : b;
|
|
988
|
+
}
|
|
939
989
|
function normalizeConnectOptions(options) {
|
|
940
990
|
return {
|
|
941
991
|
defaultAdapters: options.defaultAdapters === void 0 ? createDefaultAdapters(gateways_default) : options.defaultAdapters,
|
|
942
|
-
additionalAdapters: options.additionalAdapters
|
|
992
|
+
additionalAdapters: options.additionalAdapters,
|
|
993
|
+
enableSuggestedWallets: defaultTrue(options.enableSuggestedWallets)
|
|
943
994
|
};
|
|
944
995
|
}
|
|
945
996
|
var DappSDK = class {
|
|
@@ -967,25 +1018,6 @@ var DappSDK = class {
|
|
|
967
1018
|
}
|
|
968
1019
|
}
|
|
969
1020
|
}
|
|
970
|
-
async registerInjectedNamespaceAdapters(discovery) {
|
|
971
|
-
const existingIds = new Set(
|
|
972
|
-
discovery.listAdapters().map((a) => a.providerId)
|
|
973
|
-
);
|
|
974
|
-
const injected = discoverInjectedProviders();
|
|
975
|
-
for (const item of injected) {
|
|
976
|
-
const id = `browser:${item.id}`;
|
|
977
|
-
if (existingIds.has(id)) continue;
|
|
978
|
-
const key = `${item.id} (injected)`;
|
|
979
|
-
const adapter = new InjectedAdapter({
|
|
980
|
-
id: item.id,
|
|
981
|
-
name: key,
|
|
982
|
-
provider: item.provider,
|
|
983
|
-
description: `Injected provider from window.${item.id}`
|
|
984
|
-
});
|
|
985
|
-
discovery.registerAdapter(adapter);
|
|
986
|
-
existingIds.add(id);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
1021
|
async registerAnnouncedAdapters(discovery) {
|
|
990
1022
|
const existingIds = new Set(
|
|
991
1023
|
discovery.listAdapters().map((a) => a.providerId)
|
|
@@ -1018,7 +1050,6 @@ var DappSDK = class {
|
|
|
1018
1050
|
} else {
|
|
1019
1051
|
await this.registerAdapters(this.discovery, initAdapters);
|
|
1020
1052
|
}
|
|
1021
|
-
await this.registerInjectedNamespaceAdapters(this.discovery);
|
|
1022
1053
|
await this.registerAnnouncedAdapters(this.discovery);
|
|
1023
1054
|
await this.discovery.restorePersistedSessionIfNeeded();
|
|
1024
1055
|
if (!this.client) {
|
|
@@ -1137,6 +1168,17 @@ var DappSDK = class {
|
|
|
1137
1168
|
if (options) {
|
|
1138
1169
|
this.configuredAdapters = normalizeConnectOptions(options);
|
|
1139
1170
|
}
|
|
1171
|
+
const enableSuggestedWallets = defaultTrue(
|
|
1172
|
+
this.configuredAdapters?.enableSuggestedWallets
|
|
1173
|
+
);
|
|
1174
|
+
if (enableSuggestedWallets) {
|
|
1175
|
+
localStorage.setItem(
|
|
1176
|
+
"splice_wallet_picker_suggested_entries",
|
|
1177
|
+
JSON.stringify(wallets_default)
|
|
1178
|
+
);
|
|
1179
|
+
} else {
|
|
1180
|
+
localStorage.removeItem("splice_wallet_picker_suggested_entries");
|
|
1181
|
+
}
|
|
1140
1182
|
this.initPromise = this.initPromise ? this.initPromise.then(
|
|
1141
1183
|
() => this.ensureDiscovery(this.configuredAdapters)
|
|
1142
1184
|
) : this.ensureDiscovery(this.configuredAdapters);
|
|
@@ -1149,7 +1191,6 @@ var DappSDK = class {
|
|
|
1149
1191
|
await this.init();
|
|
1150
1192
|
}
|
|
1151
1193
|
const discovery = this.discovery;
|
|
1152
|
-
await this.registerInjectedNamespaceAdapters(discovery);
|
|
1153
1194
|
await this.registerAnnouncedAdapters(discovery);
|
|
1154
1195
|
clearAllLocalState();
|
|
1155
1196
|
const entries = discovery.listAdapters().filter((a) => !this.dynamicAdapterIds.has(a.providerId)).map((a) => {
|
|
@@ -1278,6 +1319,9 @@ var DappSDK = class {
|
|
|
1278
1319
|
async prepareExecuteAndWait(params) {
|
|
1279
1320
|
return this.requireClient().prepareExecuteAndWait(params);
|
|
1280
1321
|
}
|
|
1322
|
+
async signMessage(params) {
|
|
1323
|
+
return this.requireClient().signMessage(params);
|
|
1324
|
+
}
|
|
1281
1325
|
async ledgerApi(params) {
|
|
1282
1326
|
return this.requireClient().ledgerApi(params);
|
|
1283
1327
|
}
|
|
@@ -1296,6 +1340,9 @@ var DappSDK = class {
|
|
|
1296
1340
|
async onTxChanged(listener) {
|
|
1297
1341
|
this.requireClient().onTxChanged(listener);
|
|
1298
1342
|
}
|
|
1343
|
+
async onMessageSignature(listener) {
|
|
1344
|
+
this.requireClient().onMessageSignature(listener);
|
|
1345
|
+
}
|
|
1299
1346
|
async removeOnStatusChanged(listener) {
|
|
1300
1347
|
if (!this.client) return;
|
|
1301
1348
|
this.client.removeOnStatusChanged(listener);
|
|
@@ -1312,6 +1359,10 @@ var DappSDK = class {
|
|
|
1312
1359
|
if (!this.client) return;
|
|
1313
1360
|
this.client.removeOnTxChanged(listener);
|
|
1314
1361
|
}
|
|
1362
|
+
async removeOnMessageSignature(listener) {
|
|
1363
|
+
if (!this.client) return;
|
|
1364
|
+
this.client.removeOnMessageSignature(listener);
|
|
1365
|
+
}
|
|
1315
1366
|
};
|
|
1316
1367
|
var sdk = new DappSDK();
|
|
1317
1368
|
function connect(options) {
|
|
@@ -1389,7 +1440,6 @@ exports.DappClient = DappClient;
|
|
|
1389
1440
|
exports.DappSDK = DappSDK;
|
|
1390
1441
|
exports.ErrorCode = ErrorCode;
|
|
1391
1442
|
exports.ExtensionAdapter = ExtensionAdapter;
|
|
1392
|
-
exports.InjectedAdapter = InjectedAdapter;
|
|
1393
1443
|
exports.RemoteAdapter = RemoteAdapter;
|
|
1394
1444
|
exports.WALLET_GATEWAY_ICON = WALLET_GATEWAY_ICON;
|
|
1395
1445
|
exports.WalletConnectAdapter = WalletConnectAdapter;
|