@solana-mobile/mobile-wallet-adapter-protocol-kit 0.2.2 → 0.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 +1 -1
- package/lib/cjs/index.browser.js +83 -140
- package/lib/cjs/index.browser.js.map +1 -0
- package/lib/cjs/index.js +83 -140
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/index.native.js +80 -135
- package/lib/cjs/index.native.js.map +1 -0
- package/lib/cjs/package.json +1 -3
- package/lib/esm/index.browser.js +82 -136
- package/lib/esm/index.browser.js.map +1 -0
- package/lib/esm/index.js +82 -136
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/package.json +1 -3
- package/lib/types/index.d.ts +89 -26
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +65 -64
- package/lib/types/index.browser.d.ts +0 -40
- package/lib/types/index.browser.d.ts.map +0 -1
- package/lib/types/index.native.d.ts +0 -40
- package/lib/types/index.native.d.ts.map +0 -1
package/lib/esm/index.js
CHANGED
|
@@ -1,149 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
/******************************************************************************
|
|
5
|
-
Copyright (c) Microsoft Corporation.
|
|
6
|
-
|
|
7
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
-
purpose with or without fee is hereby granted.
|
|
9
|
-
|
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
-
***************************************************************************** */
|
|
18
|
-
|
|
19
|
-
function __rest(s, e) {
|
|
20
|
-
var t = {};
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
24
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
26
|
-
t[p[i]] = s[p[i]];
|
|
27
|
-
}
|
|
28
|
-
return t;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
32
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
33
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
34
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
36
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
37
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
1
|
+
import { compileTransaction, getBase64EncodedWireTransaction, getTransactionDecoder } from "@solana/transactions";
|
|
2
|
+
import { startRemoteScenario as startRemoteScenario$1, transact as transact$1 } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
|
+
//#region src/base64Utils.ts
|
|
41
4
|
function fromUint8Array(byteArray) {
|
|
42
|
-
|
|
5
|
+
return window.btoa(String.fromCharCode.call(null, ...byteArray));
|
|
43
6
|
}
|
|
44
7
|
function toUint8Array(base64EncodedByteArray) {
|
|
45
|
-
|
|
46
|
-
.atob(base64EncodedByteArray)
|
|
47
|
-
.split('')
|
|
48
|
-
.map((c) => c.charCodeAt(0)));
|
|
8
|
+
return new Uint8Array(window.atob(base64EncodedByteArray).split("").map((c) => c.charCodeAt(0)));
|
|
49
9
|
}
|
|
50
|
-
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/transact.ts
|
|
51
12
|
function getPayloadFromTransaction(transaction) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
else if ('instructions' in transaction) {
|
|
56
|
-
const compiledTransaction = compileTransaction(transaction);
|
|
57
|
-
return getBase64EncodedWireTransaction(compiledTransaction);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
throw new Error('Invalid transaction type');
|
|
61
|
-
}
|
|
13
|
+
if ("messageBytes" in transaction) return getBase64EncodedWireTransaction(transaction);
|
|
14
|
+
else if ("instructions" in transaction) return getBase64EncodedWireTransaction(compileTransaction(transaction));
|
|
15
|
+
else throw new Error("Invalid transaction type");
|
|
62
16
|
}
|
|
63
17
|
function getTransactionFromWireMessage(byteArray) {
|
|
64
|
-
|
|
65
|
-
return transactionDecoder.decode(byteArray);
|
|
18
|
+
return getTransactionDecoder().decode(byteArray);
|
|
66
19
|
}
|
|
67
|
-
function transact(callback, config) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return yield transact$1(augmentedCallback, config);
|
|
73
|
-
});
|
|
20
|
+
async function transact(callback, config) {
|
|
21
|
+
const augmentedCallback = (wallet) => {
|
|
22
|
+
return callback(augmentWalletAPI(wallet));
|
|
23
|
+
};
|
|
24
|
+
return await transact$1(augmentedCallback, config);
|
|
74
25
|
}
|
|
75
|
-
function startRemoteScenario(config) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
26
|
+
async function startRemoteScenario(config) {
|
|
27
|
+
const { wallet, close, associationUrl } = await startRemoteScenario$1(config);
|
|
28
|
+
return {
|
|
29
|
+
wallet: wallet.then((wallet) => {
|
|
30
|
+
return augmentWalletAPI(wallet);
|
|
31
|
+
}),
|
|
32
|
+
close,
|
|
33
|
+
associationUrl
|
|
34
|
+
};
|
|
83
35
|
}
|
|
84
36
|
function augmentWalletAPI(wallet) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
defineProperty() {
|
|
141
|
-
return false;
|
|
142
|
-
},
|
|
143
|
-
deleteProperty() {
|
|
144
|
-
return false;
|
|
145
|
-
},
|
|
146
|
-
});
|
|
37
|
+
return new Proxy({}, {
|
|
38
|
+
get(target, p) {
|
|
39
|
+
if (target[p] == null) switch (p) {
|
|
40
|
+
case "signAndSendTransactions":
|
|
41
|
+
target[p] = async function({ minContextSlot, commitment, skipPreflight, maxRetries, waitForCommitmentToSendNextTransaction, transactions, ...rest }) {
|
|
42
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
43
|
+
const options = {
|
|
44
|
+
min_context_slot: minContextSlot,
|
|
45
|
+
commitment,
|
|
46
|
+
skip_preflight: skipPreflight,
|
|
47
|
+
max_retries: maxRetries,
|
|
48
|
+
wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction
|
|
49
|
+
};
|
|
50
|
+
const { signatures: base64EncodedSignatures } = await wallet.signAndSendTransactions({
|
|
51
|
+
...rest,
|
|
52
|
+
...Object.values(options).some((element) => element != null) ? { options } : null,
|
|
53
|
+
payloads
|
|
54
|
+
});
|
|
55
|
+
return base64EncodedSignatures.map(toUint8Array);
|
|
56
|
+
};
|
|
57
|
+
break;
|
|
58
|
+
case "signMessages":
|
|
59
|
+
target[p] = async function({ payloads, ...rest }) {
|
|
60
|
+
const base64EncodedPayloads = payloads.map(fromUint8Array);
|
|
61
|
+
const { signed_payloads: base64EncodedSignedMessages } = await wallet.signMessages({
|
|
62
|
+
...rest,
|
|
63
|
+
payloads: base64EncodedPayloads
|
|
64
|
+
});
|
|
65
|
+
return base64EncodedSignedMessages.map(toUint8Array);
|
|
66
|
+
};
|
|
67
|
+
break;
|
|
68
|
+
case "signTransactions":
|
|
69
|
+
target[p] = async function({ transactions, ...rest }) {
|
|
70
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
71
|
+
const { signed_payloads: base64EncodedCompiledTransactions } = await wallet.signTransactions({
|
|
72
|
+
...rest,
|
|
73
|
+
payloads
|
|
74
|
+
});
|
|
75
|
+
return base64EncodedCompiledTransactions.map(toUint8Array).map(getTransactionFromWireMessage);
|
|
76
|
+
};
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
target[p] = wallet[p];
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
return target[p];
|
|
83
|
+
},
|
|
84
|
+
defineProperty() {
|
|
85
|
+
return false;
|
|
86
|
+
},
|
|
87
|
+
deleteProperty() {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
147
91
|
}
|
|
148
|
-
|
|
92
|
+
//#endregion
|
|
149
93
|
export { startRemoteScenario, transact };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["baseTransact","baseStartRemoteScenario"],"sources":["../../src/base64Utils.ts","../../src/transact.ts"],"sourcesContent":["export function fromUint8Array(byteArray: Uint8Array): string {\n return window.btoa(String.fromCharCode.call(null, ...byteArray));\n}\n\nexport function toUint8Array(base64EncodedByteArray: string): Uint8Array {\n return new Uint8Array(\n window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)),\n );\n}\n","import {\n type Transaction,\n compileTransaction,\n getBase64EncodedWireTransaction,\n getTransactionDecoder,\n} from '@solana/transactions';\nimport {\n type TransactionMessage,\n type TransactionMessageWithFeePayer,\n type TransactionMessageWithLifetime,\n} from '@solana/transaction-messages';\nimport type { SignatureBytes } from '@solana/keys';\nimport {\n AuthorizeAPI,\n Base64EncodedAddress,\n Base64EncodedTransaction,\n CloneAuthorizationAPI,\n DeauthorizeAPI,\n GetCapabilitiesAPI,\n MobileWallet,\n ReauthorizeAPI,\n RemoteWalletAssociationConfig,\n startRemoteScenario as baseStartRemoteScenario,\n TerminateSessionAPI,\n transact as baseTransact,\n WalletAssociationConfig,\n} from '@solana-mobile/mobile-wallet-adapter-protocol';\n\nimport { fromUint8Array, toUint8Array } from './base64Utils.js';\n\nexport type TransactionMessageWithFeePayerAndLifetime<TAddress extends string = string> = TransactionMessage &\n TransactionMessageWithFeePayer<TAddress> &\n TransactionMessageWithLifetime;\n\nexport type SignAndSendTransactionMessage = TransactionMessageWithFeePayerAndLifetime;\n\ninterface KitSignAndSendTransactionsAPI {\n signAndSendTransactions<T extends Transaction | SignAndSendTransactionMessage>(params: {\n minContextSlot?: number;\n commitment?: string;\n skipPreflight?: boolean;\n maxRetries?: number;\n waitForCommitmentToSendNextTransaction?: boolean;\n transactions: T[];\n }): Promise<SignatureBytes[]>;\n}\n\ninterface KitSignTransactionsAPI {\n signTransactions<T extends Transaction>(params: { transactions: T[] }): Promise<T[]>;\n}\n\ninterface KitSignMessagesAPI {\n signMessages(params: { addresses: Base64EncodedAddress[]; payloads: Uint8Array[] }): Promise<Uint8Array[]>;\n}\n\nexport interface KitMobileWallet\n extends\n AuthorizeAPI,\n CloneAuthorizationAPI,\n DeauthorizeAPI,\n GetCapabilitiesAPI,\n ReauthorizeAPI,\n KitSignAndSendTransactionsAPI,\n KitSignTransactionsAPI,\n KitSignMessagesAPI {}\n\nexport interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {}\n\nexport type KitScenario = Readonly<{\n wallet: Promise<KitMobileWallet>;\n close: () => void;\n}>;\n\nexport type KitRemoteScenario = KitScenario &\n Readonly<{\n associationUrl: URL;\n }>;\n\nfunction getPayloadFromTransaction(transaction: Transaction | SignAndSendTransactionMessage): Base64EncodedTransaction {\n if ('messageBytes' in transaction) {\n return getBase64EncodedWireTransaction(transaction);\n } else if ('instructions' in transaction) {\n const compiledTransaction = compileTransaction(transaction);\n return getBase64EncodedWireTransaction(compiledTransaction);\n } else {\n throw new Error('Invalid transaction type');\n }\n}\n\nfunction getTransactionFromWireMessage(byteArray: Uint8Array): Transaction {\n const transactionDecoder = getTransactionDecoder();\n return transactionDecoder.decode(byteArray);\n}\n\nexport async function transact<TReturn>(\n callback: (wallet: KitMobileWallet) => TReturn,\n config?: WalletAssociationConfig,\n): Promise<TReturn> {\n const augmentedCallback: (wallet: MobileWallet) => TReturn = (wallet) => {\n return callback(augmentWalletAPI(wallet));\n };\n return await baseTransact(augmentedCallback, config);\n}\n\nexport async function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario> {\n const { wallet, close, associationUrl } = await baseStartRemoteScenario(config);\n const augmentedPromise = wallet.then((wallet) => {\n return augmentWalletAPI(wallet);\n });\n return { wallet: augmentedPromise, close, associationUrl };\n}\n\nfunction augmentWalletAPI(wallet: MobileWallet): KitMobileWallet {\n return new Proxy<KitMobileWallet>({} as KitMobileWallet, {\n get<TMethodName extends keyof KitMobileWallet>(target: KitMobileWallet, p: TMethodName) {\n if (target[p] == null) {\n switch (p) {\n case 'signAndSendTransactions':\n target[p] = async function ({\n minContextSlot,\n commitment,\n skipPreflight,\n maxRetries,\n waitForCommitmentToSendNextTransaction,\n transactions,\n ...rest\n }: Parameters<KitMobileWallet['signAndSendTransactions']>[0]) {\n const payloads = transactions.map(getPayloadFromTransaction);\n const options = {\n min_context_slot: minContextSlot,\n commitment: commitment,\n skip_preflight: skipPreflight,\n max_retries: maxRetries,\n wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction,\n };\n const { signatures: base64EncodedSignatures } = await wallet.signAndSendTransactions({\n ...rest,\n ...(Object.values(options).some((element) => element != null)\n ? { options: options }\n : null),\n payloads,\n });\n const signatures = base64EncodedSignatures.map(toUint8Array);\n return signatures as SignatureBytes[];\n } as KitMobileWallet[TMethodName];\n break;\n case 'signMessages':\n target[p] = async function ({\n payloads,\n ...rest\n }: Parameters<KitMobileWallet['signMessages']>[0]) {\n const base64EncodedPayloads = payloads.map(fromUint8Array);\n const { signed_payloads: base64EncodedSignedMessages } = await wallet.signMessages({\n ...rest,\n payloads: base64EncodedPayloads,\n });\n const signedMessages = base64EncodedSignedMessages.map(toUint8Array);\n return signedMessages;\n } as KitMobileWallet[TMethodName];\n break;\n case 'signTransactions':\n target[p] = async function ({\n transactions,\n ...rest\n }: Parameters<KitMobileWallet['signTransactions']>[0]) {\n const payloads = transactions.map(getPayloadFromTransaction);\n const { signed_payloads: base64EncodedCompiledTransactions } =\n await wallet.signTransactions({\n ...rest,\n payloads,\n });\n const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);\n const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);\n return signedTransactions;\n } as KitMobileWallet[TMethodName];\n break;\n default: {\n target[p] = wallet[p] as unknown as KitMobileWallet[TMethodName];\n break;\n }\n }\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n}\n"],"mappings":";;;AAAA,SAAgB,eAAe,WAA+B;AAC1D,QAAO,OAAO,KAAK,OAAO,aAAa,KAAK,MAAM,GAAG,UAAU,CAAC;;AAGpE,SAAgB,aAAa,wBAA4C;AACrE,QAAO,IAAI,WACP,OACK,KAAK,uBAAuB,CAC5B,MAAM,GAAG,CACT,KAAK,MAAM,EAAE,WAAW,EAAE,CAAC,CACnC;;;;ACoEL,SAAS,0BAA0B,aAAoF;AACnH,KAAI,kBAAkB,YAClB,QAAO,gCAAgC,YAAY;UAC5C,kBAAkB,YAEzB,QAAO,gCADqB,mBAAmB,YAAY,CACA;KAE3D,OAAM,IAAI,MAAM,2BAA2B;;AAInD,SAAS,8BAA8B,WAAoC;AAEvE,QAD2B,uBAAuB,CACxB,OAAO,UAAU;;AAG/C,eAAsB,SAClB,UACA,QACgB;CAChB,MAAM,qBAAwD,WAAW;AACrE,SAAO,SAAS,iBAAiB,OAAO,CAAC;;AAE7C,QAAO,MAAMA,WAAa,mBAAmB,OAAO;;AAGxD,eAAsB,oBAAoB,QAAmE;CACzG,MAAM,EAAE,QAAQ,OAAO,mBAAmB,MAAMC,sBAAwB,OAAO;AAI/E,QAAO;EAAE,QAHgB,OAAO,MAAM,WAAW;AAC7C,UAAO,iBAAiB,OAAO;IACjC;EACiC;EAAO;EAAgB;;AAG9D,SAAS,iBAAiB,QAAuC;AAC7D,QAAO,IAAI,MAAuB,EAAE,EAAqB;EACrD,IAA+C,QAAyB,GAAgB;AACpF,OAAI,OAAO,MAAM,KACb,SAAQ,GAAR;IACI,KAAK;AACD,YAAO,KAAK,eAAgB,EACxB,gBACA,YACA,eACA,YACA,wCACA,cACA,GAAG,QACuD;MAC1D,MAAM,WAAW,aAAa,IAAI,0BAA0B;MAC5D,MAAM,UAAU;OACZ,kBAAkB;OACN;OACZ,gBAAgB;OAChB,aAAa;OACb,8CAA8C;OACjD;MACD,MAAM,EAAE,YAAY,4BAA4B,MAAM,OAAO,wBAAwB;OACjF,GAAG;OACH,GAAI,OAAO,OAAO,QAAQ,CAAC,MAAM,YAAY,WAAW,KAAK,GACvD,EAAW,SAAS,GACpB;OACN;OACH,CAAC;AAEF,aADmB,wBAAwB,IAAI,aAAa;;AAGhE;IACJ,KAAK;AACD,YAAO,KAAK,eAAgB,EACxB,UACA,GAAG,QAC4C;MAC/C,MAAM,wBAAwB,SAAS,IAAI,eAAe;MAC1D,MAAM,EAAE,iBAAiB,gCAAgC,MAAM,OAAO,aAAa;OAC/E,GAAG;OACH,UAAU;OACb,CAAC;AAEF,aADuB,4BAA4B,IAAI,aAAa;;AAGxE;IACJ,KAAK;AACD,YAAO,KAAK,eAAgB,EACxB,cACA,GAAG,QACgD;MACnD,MAAM,WAAW,aAAa,IAAI,0BAA0B;MAC5D,MAAM,EAAE,iBAAiB,sCACrB,MAAM,OAAO,iBAAiB;OAC1B,GAAG;OACH;OACH,CAAC;AAGN,aAF6B,kCAAkC,IAAI,aAAa,CAChC,IAAI,8BAA8B;;AAGtF;IACJ;AACI,YAAO,KAAK,OAAO;AACnB;;AAIZ,UAAO,OAAO;;EAElB,iBAAiB;AACb,UAAO;;EAEX,iBAAiB;AACb,UAAO;;EAEd,CAAC"}
|
package/lib/esm/package.json
CHANGED
package/lib/types/index.d.ts
CHANGED
|
@@ -1,40 +1,103 @@
|
|
|
1
1
|
import { Transaction } from "@solana/transactions";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithLifetime } from "@solana/transaction-messages";
|
|
3
|
+
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, RemoteWalletAssociationConfig, TerminateSessionAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/@solana+nominal-types@6.5.0_typescript@5.6.3/node_modules/@solana/nominal-types/dist/types/index.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Use this to produce a new type that satisfies the original type, but not the other way around.
|
|
8
|
+
* That is to say, the branded type is acceptable wherever the original type is specified, but
|
|
9
|
+
* wherever the branded type is specified, the original type will be insufficient.
|
|
10
|
+
*
|
|
11
|
+
* You can use this to create specialized instances of strings, numbers, objects, and more which
|
|
12
|
+
* you would like to assert are special in some way (eg. numbers that are non-negative, strings
|
|
13
|
+
* which represent the names of foods, objects that have passed validation).
|
|
14
|
+
*
|
|
15
|
+
* @typeParam T - The base type to brand
|
|
16
|
+
* @typeParam TBrandName - A string that identifies a particular brand. Branded types with identical
|
|
17
|
+
* names will satisfy each other so long as their base types satisfy each other. Branded types with
|
|
18
|
+
* different names will never satisfy each other.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const unverifiedName = 'Alice';
|
|
23
|
+
* const verifiedName = unverifiedName as Brand<'Alice', 'VerifiedName'>;
|
|
24
|
+
*
|
|
25
|
+
* 'Alice' satisfies Brand<string, 'VerifiedName'>; // ERROR
|
|
26
|
+
* 'Alice' satisfies Brand<'Alice', 'VerifiedName'>; // ERROR
|
|
27
|
+
* unverifiedName satisfies Brand<string, 'VerifiedName'>; // ERROR
|
|
28
|
+
* verifiedName satisfies Brand<'Bob', 'VerifiedName'>; // ERROR
|
|
29
|
+
* verifiedName satisfies Brand<'Alice', 'VerifiedName'>; // OK
|
|
30
|
+
* verifiedName satisfies Brand<string, 'VerifiedName'>; // OK
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
type Brand<T, TBrandName extends string> = NominalType<'brand', TBrandName> & T;
|
|
34
|
+
/**
|
|
35
|
+
* Use this to produce a nominal type.
|
|
36
|
+
*
|
|
37
|
+
* This can be intersected with other base types to produce custom branded types.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TKey - The name of the nominal type. This distinguishes one nominal type from another.
|
|
40
|
+
* @typeParam TMarker - The type of the value the nominal type can take.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* type SweeteningSubstance = 'aspartame' | 'cane-sugar' | 'stevia';
|
|
45
|
+
* type Sweetener<T extends SweeteningSubstance> = NominalType<'sweetener', T>;
|
|
46
|
+
*
|
|
47
|
+
* // This function accepts sweetened foods, except those with aspartame.
|
|
48
|
+
* declare function eat(food: string & Sweetener<Exclude<SweeteningSubstance, 'aspartame'>>): void;
|
|
49
|
+
*
|
|
50
|
+
* const artificiallySweetenedDessert = 'ice-cream' as string & Sweetener<'aspartame'>;
|
|
51
|
+
* eat(artificiallySweetenedDessert); // ERROR
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
type NominalType<TKey extends string, TMarker extends string> = { readonly [K in `__${TKey}:@solana/kit`]: TMarker };
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region ../../node_modules/.pnpm/@solana+keys@6.5.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.6.3/node_modules/@solana/keys/dist/types/signatures.d.ts
|
|
57
|
+
/**
|
|
58
|
+
* A 64-byte Ed25519 signature.
|
|
59
|
+
*
|
|
60
|
+
* Whenever you need to verify that a particular signature is, in fact, the one that would have been
|
|
61
|
+
* produced by signing some known bytes using the private key associated with some known public key,
|
|
62
|
+
* use the {@link verifySignature} function in this package.
|
|
63
|
+
*/
|
|
64
|
+
type SignatureBytes = Brand<Uint8Array, 'SignatureBytes'>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/transact.d.ts
|
|
67
|
+
type TransactionMessageWithFeePayerAndLifetime<TAddress extends string = string> = TransactionMessage & TransactionMessageWithFeePayer<TAddress> & TransactionMessageWithLifetime;
|
|
68
|
+
type SignAndSendTransactionMessage = TransactionMessageWithFeePayerAndLifetime;
|
|
5
69
|
interface KitSignAndSendTransactionsAPI {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
70
|
+
signAndSendTransactions<T extends Transaction | SignAndSendTransactionMessage>(params: {
|
|
71
|
+
minContextSlot?: number;
|
|
72
|
+
commitment?: string;
|
|
73
|
+
skipPreflight?: boolean;
|
|
74
|
+
maxRetries?: number;
|
|
75
|
+
waitForCommitmentToSendNextTransaction?: boolean;
|
|
76
|
+
transactions: T[];
|
|
77
|
+
}): Promise<SignatureBytes[]>;
|
|
14
78
|
}
|
|
15
79
|
interface KitSignTransactionsAPI {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
80
|
+
signTransactions<T extends Transaction>(params: {
|
|
81
|
+
transactions: T[];
|
|
82
|
+
}): Promise<T[]>;
|
|
19
83
|
}
|
|
20
84
|
interface KitSignMessagesAPI {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {
|
|
27
|
-
}
|
|
28
|
-
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {
|
|
85
|
+
signMessages(params: {
|
|
86
|
+
addresses: Base64EncodedAddress[];
|
|
87
|
+
payloads: Uint8Array[];
|
|
88
|
+
}): Promise<Uint8Array[]>;
|
|
29
89
|
}
|
|
90
|
+
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {}
|
|
91
|
+
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {}
|
|
30
92
|
type KitScenario = Readonly<{
|
|
31
|
-
|
|
32
|
-
|
|
93
|
+
wallet: Promise<KitMobileWallet>;
|
|
94
|
+
close: () => void;
|
|
33
95
|
}>;
|
|
34
96
|
type KitRemoteScenario = KitScenario & Readonly<{
|
|
35
|
-
|
|
97
|
+
associationUrl: URL;
|
|
36
98
|
}>;
|
|
37
99
|
declare function transact<TReturn>(callback: (wallet: KitMobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
|
|
38
100
|
declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario>;
|
|
39
|
-
|
|
101
|
+
//#endregion
|
|
102
|
+
export { KitMobileWallet, KitRemoteMobileWallet, KitRemoteScenario, KitScenario, SignAndSendTransactionMessage, TransactionMessageWithFeePayerAndLifetime, startRemoteScenario, transact };
|
|
40
103
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["AffinePointValidity","CompressionFormat","StringEncoding","AffinePoint","T","TValidity","NominalType","Brand","TBrandName","CompressedData","TFormat","EncodedString","TEncoding","TKey","TMarker","K","ReadonlyUint8Array","Brand","EncodedString","Signature","SignatureBytes","Uint8Array","assertIsSignature","putativeSignature","assertIsSignatureBytes","putativeSignatureBytes","isSignature","isSignatureBytes","signBytes","CryptoKey","Promise","key","data","signature","signatureBytes","verifySignature"],"sources":["../../../../node_modules/.pnpm/@solana+nominal-types@6.5.0_typescript@5.6.3/node_modules/@solana/nominal-types/dist/types/index.d.ts","../../../../node_modules/.pnpm/@solana+keys@6.5.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.6.3/node_modules/@solana/keys/dist/types/signatures.d.ts","../../src/transact.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;;;;AEkCA;;;;;AAAsF;;;;;;;;;KFsC1EO,KAAAA,iCAAsCD,WAAAA,UAAqBE,UAAAA,IAAcJ,CAAAA;;;;;;;;;;;;;;;;;;;AEjBrF;;KF0EYE,WAAAA,sEACYO,IAAAA,iBAAqBC,OAAAA;;;;;;;;;;KCrHjCM,cAAAA,GAAiBH,KAAAA,CAAMI,UAAAA;;;KCiBvB,yCAAA,qCAA8E,kBAAA,GACtF,8BAAA,CAA+B,QAAA,IAC/B,8BAAA;AAAA,KAEQ,6BAAA,GAAgC,yCAAA;AAAA,UAElC,6BAAA;EACN,uBAAA,WAAkC,WAAA,GAAc,6BAAA,EAA+B,MAAA;IAC3E,cAAA;IACA,UAAA;IACA,aAAA;IACA,UAAA;IACA,sCAAA;IACA,YAAA,EAAc,CAAA;EAAA,IACd,OAAA,CAAQ,cAAA;AAAA;AAAA,UAGN,sBAAA;EACN,gBAAA,WAA2B,WAAA,EAAa,MAAA;IAAU,YAAA,EAAc,CAAA;EAAA,IAAQ,OAAA,CAAQ,CAAA;AAAA;AAAA,UAG1E,kBAAA;EACN,YAAA,CAAa,MAAA;IAAU,SAAA,EAAW,oBAAA;IAAwB,QAAA,EAAU,UAAA;EAAA,IAAiB,OAAA,CAAQ,UAAA;AAAA;AAAA,UAGhF,eAAA,SAET,YAAA,EACA,qBAAA,EACA,cAAA,EACA,kBAAA,EACA,cAAA,EACA,6BAAA,EACA,sBAAA,EACA,kBAAA;AAAA,UAES,qBAAA,SAA8B,eAAA,EAAiB,mBAAA;AAAA,KAEpD,WAAA,GAAc,QAAA;EACtB,MAAA,EAAQ,OAAA,CAAQ,eAAA;EAChB,KAAA;AAAA;AAAA,KAGQ,iBAAA,GAAoB,WAAA,GAC5B,QAAA;EACI,cAAA,EAAgB,GAAA;AAAA;AAAA,iBAmBF,QAAA,SAAA,CAClB,QAAA,GAAW,MAAA,EAAQ,eAAA,KAAoB,OAAA,EACvC,MAAA,GAAS,uBAAA,GACV,OAAA,CAAQ,OAAA;AAAA,iBAOW,mBAAA,CAAoB,MAAA,EAAQ,6BAAA,GAAgC,OAAA,CAAQ,iBAAA"}
|
package/package.json
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"name": "@solana-mobile/mobile-wallet-adapter-protocol-kit",
|
|
3
|
+
"description": "A convenience wrapper that enables you to call Solana Mobile Stack protocol methods using objects from @solana/kit",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"author": "Marco Martinez <marco.martinez@solana.com>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/solana-mobile/mobile-wallet-adapter.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"exports": {
|
|
12
|
+
"edge-light": {
|
|
13
|
+
"import": "./lib/esm/index.js",
|
|
14
|
+
"require": "./lib/cjs/index.js"
|
|
9
15
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"import": "./lib/esm/index.js",
|
|
14
|
-
"require": "./lib/cjs/index.js"
|
|
15
|
-
},
|
|
16
|
-
"workerd": {
|
|
17
|
-
"import": "./lib/esm/index.js",
|
|
18
|
-
"require": "./lib/cjs/index.js"
|
|
19
|
-
},
|
|
20
|
-
"browser": {
|
|
21
|
-
"import": "./lib/esm/index.browser.js",
|
|
22
|
-
"require": "./lib/cjs/index.browser.js"
|
|
23
|
-
},
|
|
24
|
-
"node": {
|
|
25
|
-
"import": "./lib/esm/index.js",
|
|
26
|
-
"require": "./lib/cjs/index.js"
|
|
27
|
-
},
|
|
28
|
-
"react-native": "./lib/cjs/index.native.js",
|
|
29
|
-
"types": "./lib/types/index.d.ts"
|
|
16
|
+
"workerd": {
|
|
17
|
+
"import": "./lib/esm/index.js",
|
|
18
|
+
"require": "./lib/cjs/index.js"
|
|
30
19
|
},
|
|
31
20
|
"browser": {
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
"import": "./lib/esm/index.browser.js",
|
|
22
|
+
"require": "./lib/cjs/index.browser.js"
|
|
34
23
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"types": "lib/types/index.d.ts",
|
|
39
|
-
"type": "module",
|
|
40
|
-
"files": [
|
|
41
|
-
"lib",
|
|
42
|
-
"LICENSE"
|
|
43
|
-
],
|
|
44
|
-
"sideEffects": false,
|
|
45
|
-
"publishConfig": {
|
|
46
|
-
"access": "public"
|
|
24
|
+
"node": {
|
|
25
|
+
"import": "./lib/esm/index.js",
|
|
26
|
+
"require": "./lib/cjs/index.js"
|
|
47
27
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
28
|
+
"react-native": "./lib/cjs/index.native.js",
|
|
29
|
+
"types": "./lib/types/index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"browser": {
|
|
32
|
+
"./lib/cjs/index.js": "./lib/cjs/index.browser.js",
|
|
33
|
+
"./lib/esm/index.js": "./lib/esm/index.browser.js"
|
|
34
|
+
},
|
|
35
|
+
"main": "lib/cjs/index.js",
|
|
36
|
+
"module": "lib/esm/index.js",
|
|
37
|
+
"react-native": "lib/cjs/index.native.js",
|
|
38
|
+
"types": "lib/types/index.d.ts",
|
|
39
|
+
"type": "module",
|
|
40
|
+
"files": [
|
|
41
|
+
"lib",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"sideEffects": false,
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@solana/kit": "^6.0.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@solana/transactions": "^6.0.0",
|
|
53
|
+
"@solana/transaction-messages": "^6.0.0",
|
|
54
|
+
"bs58": "^6.0.0",
|
|
55
|
+
"js-base64": "^3.7.7",
|
|
56
|
+
"@solana-mobile/mobile-wallet-adapter-protocol": "^2.2.7"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@solana/keys": "^6.0.0",
|
|
60
|
+
"agadoo": "^3.0.0",
|
|
61
|
+
"cross-env": "^10.1.0",
|
|
62
|
+
"shx": "^0.4.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"clean": "shx rm -rf lib/*",
|
|
66
|
+
"build": "pnpm clean && tsdown --config ../../tsdown.config.ts",
|
|
67
|
+
"build:watch": "pnpm clean && tsdown --config ../../tsdown.config.ts --watch",
|
|
68
|
+
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
69
|
+
"postbuild": "printf '%s' '{\"type\":\"commonjs\"}' > lib/cjs/package.json && printf '%s' '{\"type\":\"module\"}' > lib/esm/package.json"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Transaction } from "@solana/transactions";
|
|
2
|
-
import { CompilableTransactionMessage } from "@solana/transaction-messages";
|
|
3
|
-
import { SignatureBytes } from "@solana/keys";
|
|
4
|
-
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, TerminateSessionAPI, WalletAssociationConfig, RemoteWalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
5
|
-
interface KitSignAndSendTransactionsAPI {
|
|
6
|
-
signAndSendTransactions<T extends Transaction | CompilableTransactionMessage>(params: {
|
|
7
|
-
minContextSlot?: number;
|
|
8
|
-
commitment?: string;
|
|
9
|
-
skipPreflight?: boolean;
|
|
10
|
-
maxRetries?: number;
|
|
11
|
-
waitForCommitmentToSendNextTransaction?: boolean;
|
|
12
|
-
transactions: T[];
|
|
13
|
-
}): Promise<SignatureBytes[]>;
|
|
14
|
-
}
|
|
15
|
-
interface KitSignTransactionsAPI {
|
|
16
|
-
signTransactions<T extends Transaction>(params: {
|
|
17
|
-
transactions: T[];
|
|
18
|
-
}): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
interface KitSignMessagesAPI {
|
|
21
|
-
signMessages(params: {
|
|
22
|
-
addresses: Base64EncodedAddress[];
|
|
23
|
-
payloads: Uint8Array[];
|
|
24
|
-
}): Promise<Uint8Array[]>;
|
|
25
|
-
}
|
|
26
|
-
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {
|
|
27
|
-
}
|
|
28
|
-
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {
|
|
29
|
-
}
|
|
30
|
-
type KitScenario = Readonly<{
|
|
31
|
-
wallet: Promise<KitMobileWallet>;
|
|
32
|
-
close: () => void;
|
|
33
|
-
}>;
|
|
34
|
-
type KitRemoteScenario = KitScenario & Readonly<{
|
|
35
|
-
associationUrl: URL;
|
|
36
|
-
}>;
|
|
37
|
-
declare function transact<TReturn>(callback: (wallet: KitMobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
|
|
38
|
-
declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario>;
|
|
39
|
-
export { KitMobileWallet, KitRemoteMobileWallet, KitScenario, KitRemoteScenario, transact, startRemoteScenario };
|
|
40
|
-
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/transact.ts"],"names":[],"mappings":""}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Transaction } from "@solana/transactions";
|
|
2
|
-
import { CompilableTransactionMessage } from "@solana/transaction-messages";
|
|
3
|
-
import { SignatureBytes } from "@solana/keys";
|
|
4
|
-
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, TerminateSessionAPI, WalletAssociationConfig, RemoteWalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
5
|
-
interface KitSignAndSendTransactionsAPI {
|
|
6
|
-
signAndSendTransactions<T extends Transaction | CompilableTransactionMessage>(params: {
|
|
7
|
-
minContextSlot?: number;
|
|
8
|
-
commitment?: string;
|
|
9
|
-
skipPreflight?: boolean;
|
|
10
|
-
maxRetries?: number;
|
|
11
|
-
waitForCommitmentToSendNextTransaction?: boolean;
|
|
12
|
-
transactions: T[];
|
|
13
|
-
}): Promise<SignatureBytes[]>;
|
|
14
|
-
}
|
|
15
|
-
interface KitSignTransactionsAPI {
|
|
16
|
-
signTransactions<T extends Transaction>(params: {
|
|
17
|
-
transactions: T[];
|
|
18
|
-
}): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
interface KitSignMessagesAPI {
|
|
21
|
-
signMessages(params: {
|
|
22
|
-
addresses: Base64EncodedAddress[];
|
|
23
|
-
payloads: Uint8Array[];
|
|
24
|
-
}): Promise<Uint8Array[]>;
|
|
25
|
-
}
|
|
26
|
-
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {
|
|
27
|
-
}
|
|
28
|
-
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {
|
|
29
|
-
}
|
|
30
|
-
type KitScenario = Readonly<{
|
|
31
|
-
wallet: Promise<KitMobileWallet>;
|
|
32
|
-
close: () => void;
|
|
33
|
-
}>;
|
|
34
|
-
type KitRemoteScenario = KitScenario & Readonly<{
|
|
35
|
-
associationUrl: URL;
|
|
36
|
-
}>;
|
|
37
|
-
declare function transact<TReturn>(callback: (wallet: KitMobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
|
|
38
|
-
declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario>;
|
|
39
|
-
export { KitMobileWallet, KitRemoteMobileWallet, KitScenario, KitRemoteScenario, transact, startRemoteScenario };
|
|
40
|
-
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/transact.ts"],"names":[],"mappings":""}
|