near-kit 0.0.0 → 0.1.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/LICENSE +21 -0
- package/README.md +371 -2
- package/dist/contracts/contract.d.ts +63 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +42 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/core/actions.d.ts +193 -0
- package/dist/core/actions.d.ts.map +1 -0
- package/dist/core/actions.js +195 -0
- package/dist/core/actions.js.map +1 -0
- package/dist/core/config-schemas.d.ts +179 -0
- package/dist/core/config-schemas.d.ts.map +1 -0
- package/dist/core/config-schemas.js +169 -0
- package/dist/core/config-schemas.js.map +1 -0
- package/dist/core/constants.d.ts +43 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +49 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/near.d.ts +301 -0
- package/dist/core/near.d.ts.map +1 -0
- package/dist/core/near.js +504 -0
- package/dist/core/near.js.map +1 -0
- package/dist/core/nonce-manager.d.ts +39 -0
- package/dist/core/nonce-manager.d.ts.map +1 -0
- package/dist/core/nonce-manager.js +73 -0
- package/dist/core/nonce-manager.js.map +1 -0
- package/dist/core/rpc/rpc-error-handler.d.ts +60 -0
- package/dist/core/rpc/rpc-error-handler.d.ts.map +1 -0
- package/dist/core/rpc/rpc-error-handler.js +324 -0
- package/dist/core/rpc/rpc-error-handler.js.map +1 -0
- package/dist/core/rpc/rpc-schemas.d.ts +1812 -0
- package/dist/core/rpc/rpc-schemas.d.ts.map +1 -0
- package/dist/core/rpc/rpc-schemas.js +424 -0
- package/dist/core/rpc/rpc-schemas.js.map +1 -0
- package/dist/core/rpc/rpc.d.ts +117 -0
- package/dist/core/rpc/rpc.d.ts.map +1 -0
- package/dist/core/rpc/rpc.js +325 -0
- package/dist/core/rpc/rpc.js.map +1 -0
- package/dist/core/schema.d.ts +1188 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +396 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/transaction.d.ts +390 -0
- package/dist/core/transaction.d.ts.map +1 -0
- package/dist/core/transaction.js +649 -0
- package/dist/core/transaction.js.map +1 -0
- package/dist/core/types.d.ts +271 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +9 -0
- package/dist/core/types.js.map +1 -0
- package/dist/errors/index.d.ts +226 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +366 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/keys/credential-schemas.d.ts +98 -0
- package/dist/keys/credential-schemas.d.ts.map +1 -0
- package/dist/keys/credential-schemas.js +128 -0
- package/dist/keys/credential-schemas.js.map +1 -0
- package/dist/keys/file-keystore.d.ts +130 -0
- package/dist/keys/file-keystore.d.ts.map +1 -0
- package/dist/keys/file-keystore.js +266 -0
- package/dist/keys/file-keystore.js.map +1 -0
- package/dist/keys/in-memory-keystore.d.ts +71 -0
- package/dist/keys/in-memory-keystore.d.ts.map +1 -0
- package/dist/keys/in-memory-keystore.js +85 -0
- package/dist/keys/in-memory-keystore.js.map +1 -0
- package/dist/keys/index.d.ts +12 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +18 -0
- package/dist/keys/index.js.map +1 -0
- package/dist/keys/native-keystore.d.ts +111 -0
- package/dist/keys/native-keystore.d.ts.map +1 -0
- package/dist/keys/native-keystore.js +167 -0
- package/dist/keys/native-keystore.js.map +1 -0
- package/dist/sandbox/index.d.ts +6 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +5 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/sandbox.d.ts +55 -0
- package/dist/sandbox/sandbox.d.ts.map +1 -0
- package/dist/sandbox/sandbox.js +341 -0
- package/dist/sandbox/sandbox.js.map +1 -0
- package/dist/utils/amount.d.ts +76 -0
- package/dist/utils/amount.d.ts.map +1 -0
- package/dist/utils/amount.js +137 -0
- package/dist/utils/amount.js.map +1 -0
- package/dist/utils/gas.d.ts +69 -0
- package/dist/utils/gas.d.ts.map +1 -0
- package/dist/utils/gas.js +92 -0
- package/dist/utils/gas.js.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/key.d.ts +117 -0
- package/dist/utils/key.d.ts.map +1 -0
- package/dist/utils/key.js +270 -0
- package/dist/utils/key.js.map +1 -0
- package/dist/utils/nep413.d.ts +97 -0
- package/dist/utils/nep413.d.ts.map +1 -0
- package/dist/utils/nep413.js +154 -0
- package/dist/utils/nep413.js.map +1 -0
- package/dist/utils/validation.d.ts +114 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +150 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/wallets/adapters.d.ts +119 -0
- package/dist/wallets/adapters.d.ts.map +1 -0
- package/dist/wallets/adapters.js +267 -0
- package/dist/wallets/adapters.js.map +1 -0
- package/dist/wallets/index.d.ts +11 -0
- package/dist/wallets/index.d.ts.map +1 -0
- package/dist/wallets/index.js +2 -0
- package/dist/wallets/index.js.map +1 -0
- package/dist/wallets/types.d.ts +99 -0
- package/dist/wallets/types.d.ts.map +1 -0
- package/dist/wallets/types.js +10 -0
- package/dist/wallets/types.js.map +1 -0
- package/package.json +78 -7
- package/index.js +0 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet adapters for NEAR wallet integrations.
|
|
3
|
+
*
|
|
4
|
+
* Provides adapter functions to integrate with popular NEAR wallets:
|
|
5
|
+
* - `@near-wallet-selector/core`
|
|
6
|
+
* - `@hot-labs/near-connect`
|
|
7
|
+
*
|
|
8
|
+
* These adapters use duck typing / structural compatibility to work with
|
|
9
|
+
* wallet interfaces. While the actual wallet packages use `@near-js` types
|
|
10
|
+
* (which are classes), our types (plain objects) are structurally compatible
|
|
11
|
+
* and work correctly at runtime. See `tests/wallets/type-compatibility.test.ts`
|
|
12
|
+
* for verification.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Adapter for @near-wallet-selector/core
|
|
16
|
+
*
|
|
17
|
+
* Converts a wallet-selector Wallet instance to the WalletConnection interface.
|
|
18
|
+
*
|
|
19
|
+
* @param wallet - Wallet instance from wallet-selector
|
|
20
|
+
* @returns WalletConnection interface compatible with near-ts
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import { Near } from 'near-ts'
|
|
25
|
+
* import { setupWalletSelector } from '@near-wallet-selector/core'
|
|
26
|
+
* import { fromWalletSelector } from 'near-ts/wallets'
|
|
27
|
+
*
|
|
28
|
+
* const selector = await setupWalletSelector({
|
|
29
|
+
* network: 'mainnet',
|
|
30
|
+
* modules: [...]
|
|
31
|
+
* })
|
|
32
|
+
* const wallet = await selector.wallet()
|
|
33
|
+
*
|
|
34
|
+
* const near = new Near({
|
|
35
|
+
* network: 'mainnet',
|
|
36
|
+
* wallet: fromWalletSelector(wallet)
|
|
37
|
+
* })
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export function fromWalletSelector(wallet) {
|
|
41
|
+
return {
|
|
42
|
+
async getAccounts() {
|
|
43
|
+
const accounts = await wallet.getAccounts();
|
|
44
|
+
return accounts.map((acc) => ({
|
|
45
|
+
accountId: acc.accountId,
|
|
46
|
+
...(acc.publicKey !== undefined && { publicKey: acc.publicKey }),
|
|
47
|
+
}));
|
|
48
|
+
},
|
|
49
|
+
async signAndSendTransaction(params) {
|
|
50
|
+
// Our Action[] type is structurally compatible with @near-js Action[]
|
|
51
|
+
// Duck typing works at runtime - see type-compatibility.test.ts
|
|
52
|
+
const result = await wallet.signAndSendTransaction({
|
|
53
|
+
...(params.signerId !== undefined && { signerId: params.signerId }),
|
|
54
|
+
receiverId: params.receiverId,
|
|
55
|
+
actions: params.actions,
|
|
56
|
+
});
|
|
57
|
+
if (!result) {
|
|
58
|
+
throw new Error("Wallet did not return transaction outcome");
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
},
|
|
62
|
+
async signMessage(params) {
|
|
63
|
+
if (!wallet.signMessage) {
|
|
64
|
+
throw new Error("Wallet does not support message signing");
|
|
65
|
+
}
|
|
66
|
+
// wallet-selector expects Buffer, convert from Uint8Array
|
|
67
|
+
const nonce = Buffer.from(params.nonce);
|
|
68
|
+
const result = await wallet.signMessage({
|
|
69
|
+
message: params.message,
|
|
70
|
+
recipient: params.recipient,
|
|
71
|
+
nonce,
|
|
72
|
+
});
|
|
73
|
+
// Browser wallets may return void
|
|
74
|
+
if (!result) {
|
|
75
|
+
throw new Error("Wallet did not return signed message");
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Adapter for @hot-labs/near-connect (HOT Connect)
|
|
83
|
+
*
|
|
84
|
+
* Converts a HOT Connect NearConnector instance to the WalletConnection interface.
|
|
85
|
+
*
|
|
86
|
+
* @param connector - NearConnector instance from HOT Connect
|
|
87
|
+
* @returns WalletConnection interface compatible with near-ts
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* import { Near } from 'near-ts'
|
|
92
|
+
* import { NearConnector } from '@hot-labs/near-connect'
|
|
93
|
+
* import { fromHotConnect } from 'near-ts/wallets'
|
|
94
|
+
*
|
|
95
|
+
* const connector = new NearConnector({ network: 'mainnet' })
|
|
96
|
+
*
|
|
97
|
+
* // Wait for user to connect their wallet
|
|
98
|
+
* connector.on('wallet:signIn', async () => {
|
|
99
|
+
* const near = new Near({
|
|
100
|
+
* network: 'mainnet',
|
|
101
|
+
* wallet: fromHotConnect(connector)
|
|
102
|
+
* })
|
|
103
|
+
*
|
|
104
|
+
* // Use near-ts with the connected wallet
|
|
105
|
+
* await near.call('contract.near', 'method', { arg: 'value' })
|
|
106
|
+
* })
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* Adapter for @hot-labs/near-connect (HOT Connect)
|
|
111
|
+
*
|
|
112
|
+
* Converts a HOT Connect NearConnector instance to the WalletConnection interface.
|
|
113
|
+
*
|
|
114
|
+
* @param connector - NearConnector instance from HOT Connect
|
|
115
|
+
* @returns WalletConnection interface compatible with near-kit
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* import { Near } from 'near-kit'
|
|
120
|
+
* import { NearConnector } from '@hot-labs/near-connect'
|
|
121
|
+
* import { fromHotConnect } from 'near-kit/wallets'
|
|
122
|
+
*
|
|
123
|
+
* const connector = new NearConnector({ network: 'mainnet' })
|
|
124
|
+
*
|
|
125
|
+
* // Wait for user to connect their wallet
|
|
126
|
+
* connector.on('wallet:signIn', async () => {
|
|
127
|
+
* const near = new Near({
|
|
128
|
+
* network: 'mainnet',
|
|
129
|
+
* wallet: fromHotConnect(connector)
|
|
130
|
+
* })
|
|
131
|
+
*
|
|
132
|
+
* // Use near-kit with the connected wallet
|
|
133
|
+
* await near.call('contract.near', 'method', { arg: 'value' })
|
|
134
|
+
* })
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
export function fromHotConnect(connector) {
|
|
138
|
+
// Validate that we have a proper connector
|
|
139
|
+
if (!connector || typeof connector.wallet !== "function") {
|
|
140
|
+
throw new Error("Invalid HOT Connect instance. Make sure @hot-labs/near-connect is installed and you're passing a NearConnector instance.");
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
async getAccounts() {
|
|
144
|
+
const wallet = await connector.wallet();
|
|
145
|
+
const accounts = await wallet.getAccounts();
|
|
146
|
+
return accounts.map((acc) => ({
|
|
147
|
+
accountId: acc.accountId,
|
|
148
|
+
publicKey: acc.publicKey,
|
|
149
|
+
}));
|
|
150
|
+
},
|
|
151
|
+
async signAndSendTransaction(params) {
|
|
152
|
+
const wallet = await connector.wallet();
|
|
153
|
+
const convertAction = (action) => {
|
|
154
|
+
const a = action;
|
|
155
|
+
if ("functionCall" in a && a["functionCall"]) {
|
|
156
|
+
const fc = a["functionCall"];
|
|
157
|
+
let args = fc.args;
|
|
158
|
+
if (Array.isArray(args) &&
|
|
159
|
+
args.every((x) => typeof x === "number")) {
|
|
160
|
+
try {
|
|
161
|
+
const argsString = new TextDecoder().decode(new Uint8Array(args));
|
|
162
|
+
args = JSON.parse(argsString);
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// If parsing fails, keep args as raw bytes (may be binary data)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const argsObject = args && typeof args === "object" && !Array.isArray(args)
|
|
169
|
+
? args
|
|
170
|
+
: {};
|
|
171
|
+
return {
|
|
172
|
+
type: "FunctionCall",
|
|
173
|
+
params: {
|
|
174
|
+
methodName: fc.methodName,
|
|
175
|
+
args: argsObject,
|
|
176
|
+
gas: fc.gas.toString(),
|
|
177
|
+
deposit: fc.deposit.toString(),
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
if ("transfer" in a && a["transfer"]) {
|
|
182
|
+
const t = a["transfer"];
|
|
183
|
+
return {
|
|
184
|
+
type: "Transfer",
|
|
185
|
+
params: { deposit: t.deposit.toString() },
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if ("stake" in a && a["stake"]) {
|
|
189
|
+
const s = a["stake"];
|
|
190
|
+
return {
|
|
191
|
+
type: "Stake",
|
|
192
|
+
params: {
|
|
193
|
+
stake: s.stake.toString(),
|
|
194
|
+
// HOT Connect expects a base58 string; we forward whatever representation
|
|
195
|
+
// we have and rely on upstream tooling when stake is used with wallets.
|
|
196
|
+
publicKey: String(s.publicKey),
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if ("addKey" in a && a["addKey"]) {
|
|
201
|
+
const ak = a["addKey"];
|
|
202
|
+
return {
|
|
203
|
+
type: "AddKey",
|
|
204
|
+
params: {
|
|
205
|
+
publicKey: String(ak.publicKey),
|
|
206
|
+
accessKey: {
|
|
207
|
+
nonce: Number(ak.accessKey.nonce),
|
|
208
|
+
permission: ak.accessKey
|
|
209
|
+
.permission,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if ("deleteKey" in a && a["deleteKey"]) {
|
|
215
|
+
const dk = a["deleteKey"];
|
|
216
|
+
return {
|
|
217
|
+
type: "DeleteKey",
|
|
218
|
+
params: {
|
|
219
|
+
publicKey: String(dk.publicKey),
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if ("deleteAccount" in a && a["deleteAccount"]) {
|
|
224
|
+
const da = a["deleteAccount"];
|
|
225
|
+
return {
|
|
226
|
+
type: "DeleteAccount",
|
|
227
|
+
params: {
|
|
228
|
+
beneficiaryId: da.beneficiaryId,
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
if ("createAccount" in a && a["createAccount"] !== undefined) {
|
|
233
|
+
return {
|
|
234
|
+
type: "CreateAccount",
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
if ("deployContract" in a && a["deployContract"]) {
|
|
238
|
+
const dc = a["deployContract"];
|
|
239
|
+
return {
|
|
240
|
+
type: "DeployContract",
|
|
241
|
+
params: {
|
|
242
|
+
code: dc.code,
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
throw new Error(`Unsupported action type: ${Object.keys(a).join(", ") || "unknown"}`);
|
|
247
|
+
};
|
|
248
|
+
const hotConnectorActions = params.actions.map(convertAction);
|
|
249
|
+
const result = await wallet.signAndSendTransaction({
|
|
250
|
+
...(params.signerId !== undefined && { signerId: params.signerId }),
|
|
251
|
+
receiverId: params.receiverId,
|
|
252
|
+
actions: hotConnectorActions,
|
|
253
|
+
});
|
|
254
|
+
return result;
|
|
255
|
+
},
|
|
256
|
+
async signMessage(params) {
|
|
257
|
+
const wallet = await connector.wallet();
|
|
258
|
+
const result = await wallet.signMessage({
|
|
259
|
+
message: params.message,
|
|
260
|
+
recipient: params.recipient,
|
|
261
|
+
nonce: params.nonce,
|
|
262
|
+
});
|
|
263
|
+
return result;
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=adapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/wallets/adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoCH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAA4B;IAE5B,OAAO;QACL,KAAK,CAAC,WAAW;YACf,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAA;YAC3C,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAC5B,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,GAAG,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;aACjE,CAAC,CAAC,CAAA;QACL,CAAC;QAED,KAAK,CAAC,sBAAsB,CAAC,MAAM;YACjC,sEAAsE;YACtE,gEAAgE;YAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC;gBACjD,GAAG,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAA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CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACnE,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,OAAO,EAAE,mBAAmB;aAC7B,CAAC,CAAA;YAEF,OAAO,MAA+B,CAAA;QACxC,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,MAAM;YACtB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,CAAA;YACvC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;gBACtC,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC,CAAA;YACF,OAAO,MAAuB,CAAA;QAChC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet integration adapters for NEAR.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Re-exports the {@link WalletConnection} interface and concrete adapters
|
|
6
|
+
* {@link fromWalletSelector} and {@link fromHotConnect} for integrating with
|
|
7
|
+
* common NEAR wallet libraries.
|
|
8
|
+
*/
|
|
9
|
+
export type { WalletConnection } from "../core/types.js";
|
|
10
|
+
export { fromHotConnect, fromWalletSelector } from "./adapters.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallets/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal wallet type helpers for near-kit.
|
|
3
|
+
*
|
|
4
|
+
* Defines lightweight structural types for external wallet libraries
|
|
5
|
+
* (e.g. HOT Connect) without taking a hard dependency on their packages.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
import type { FinalExecutionOutcome, SignedMessage } from "../core/types.js";
|
|
10
|
+
/**
|
|
11
|
+
* HOT Connect action types, mirroring `@hot-labs/near-connect`'s
|
|
12
|
+
* `types/transactions.ts` definitions.
|
|
13
|
+
*/
|
|
14
|
+
export type HotConnectCreateAccountAction = {
|
|
15
|
+
type: "CreateAccount";
|
|
16
|
+
};
|
|
17
|
+
export type HotConnectDeployContractAction = {
|
|
18
|
+
type: "DeployContract";
|
|
19
|
+
params: {
|
|
20
|
+
code: Uint8Array;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type HotConnectFunctionCallAction = {
|
|
24
|
+
type: "FunctionCall";
|
|
25
|
+
params: {
|
|
26
|
+
methodName: string;
|
|
27
|
+
args: Record<string, unknown>;
|
|
28
|
+
gas: string;
|
|
29
|
+
deposit: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type HotConnectTransferAction = {
|
|
33
|
+
type: "Transfer";
|
|
34
|
+
params: {
|
|
35
|
+
deposit: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type HotConnectStakeAction = {
|
|
39
|
+
type: "Stake";
|
|
40
|
+
params: {
|
|
41
|
+
stake: string;
|
|
42
|
+
publicKey: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type HotConnectAddKeyPermission = "FullAccess" | {
|
|
46
|
+
receiverId: string;
|
|
47
|
+
allowance?: string;
|
|
48
|
+
methodNames?: string[];
|
|
49
|
+
};
|
|
50
|
+
export type HotConnectAddKeyAction = {
|
|
51
|
+
type: "AddKey";
|
|
52
|
+
params: {
|
|
53
|
+
publicKey: string;
|
|
54
|
+
accessKey: {
|
|
55
|
+
nonce?: number;
|
|
56
|
+
permission: HotConnectAddKeyPermission;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type HotConnectDeleteKeyAction = {
|
|
61
|
+
type: "DeleteKey";
|
|
62
|
+
params: {
|
|
63
|
+
publicKey: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type HotConnectDeleteAccountAction = {
|
|
67
|
+
type: "DeleteAccount";
|
|
68
|
+
params: {
|
|
69
|
+
beneficiaryId: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export type HotConnectAction = HotConnectCreateAccountAction | HotConnectDeployContractAction | HotConnectFunctionCallAction | HotConnectTransferAction | HotConnectStakeAction | HotConnectAddKeyAction | HotConnectDeleteKeyAction | HotConnectDeleteAccountAction;
|
|
73
|
+
/**
|
|
74
|
+
* HOT Connect wallet + connector interfaces (structural).
|
|
75
|
+
*/
|
|
76
|
+
export type HotConnectWallet = {
|
|
77
|
+
getAccounts(data?: {
|
|
78
|
+
network?: string;
|
|
79
|
+
}): Promise<Array<{
|
|
80
|
+
accountId: string;
|
|
81
|
+
publicKey: string;
|
|
82
|
+
}>>;
|
|
83
|
+
signAndSendTransaction(params: {
|
|
84
|
+
signerId?: string;
|
|
85
|
+
receiverId: string;
|
|
86
|
+
actions: HotConnectAction[];
|
|
87
|
+
network?: string;
|
|
88
|
+
}): Promise<FinalExecutionOutcome>;
|
|
89
|
+
signMessage(params: {
|
|
90
|
+
message: string;
|
|
91
|
+
recipient: string;
|
|
92
|
+
nonce: Uint8Array;
|
|
93
|
+
network?: string;
|
|
94
|
+
}): Promise<SignedMessage>;
|
|
95
|
+
};
|
|
96
|
+
export type HotConnectConnector = {
|
|
97
|
+
wallet(): Promise<HotConnectWallet>;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallets/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAE5E;;;GAGG;AAEH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,eAAe,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,EAAE;QACN,IAAI,EAAE,UAAU,CAAA;KACjB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAA;QAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC7B,GAAG,EAAE,MAAM,CAAA;QACX,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,0BAA0B,GAClC,YAAY,GACZ;IACE,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,Q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Aa,CAAC,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACpC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal wallet type helpers for near-kit.
|
|
3
|
+
*
|
|
4
|
+
* Defines lightweight structural types for external wallet libraries
|
|
5
|
+
* (e.g. HOT Connect) without taking a hard dependency on their packages.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/wallets/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "near-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A simple, intuitive TypeScript library for interacting with NEAR Protocol",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./sandbox": {
|
|
15
|
+
"import": "./dist/sandbox/index.js",
|
|
16
|
+
"types": "./dist/sandbox/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./keys/file": {
|
|
19
|
+
"import": "./dist/keys/file-keystore.js",
|
|
20
|
+
"types": "./dist/keys/file-keystore.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./keys/native": {
|
|
23
|
+
"import": "./dist/keys/native-keystore.js",
|
|
24
|
+
"types": "./dist/keys/native-keystore.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
6
30
|
"scripts": {
|
|
7
|
-
"
|
|
31
|
+
"build": "tsc",
|
|
32
|
+
"dev": "tsc --watch",
|
|
33
|
+
"test": "bun test",
|
|
34
|
+
"lint": "biome check .",
|
|
35
|
+
"typecheck": "tsc --noEmit --project tsconfig.typecheck.json",
|
|
36
|
+
"prepublishOnly": "bun run build",
|
|
37
|
+
"release": "bun run build && changeset publish",
|
|
38
|
+
"lefthook": "lefthook install"
|
|
8
39
|
},
|
|
9
|
-
"keywords": [
|
|
40
|
+
"keywords": [
|
|
41
|
+
"near",
|
|
42
|
+
"near-protocol",
|
|
43
|
+
"blockchain",
|
|
44
|
+
"typescript",
|
|
45
|
+
"web3"
|
|
46
|
+
],
|
|
10
47
|
"author": "",
|
|
11
|
-
"license": "
|
|
12
|
-
"
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@hot-labs/near-connect": ">=0.6.0",
|
|
51
|
+
"@near-wallet-selector/core": ">=8.0.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"@hot-labs/near-connect": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"@near-wallet-selector/core": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@biomejs/biome": "^2.3.5",
|
|
63
|
+
"@changesets/cli": "^2.29.7",
|
|
64
|
+
"@hot-labs/near-connect": "^0.6.9",
|
|
65
|
+
"@near-js/transactions": "^2.5.1",
|
|
66
|
+
"@near-js/types": "^2.5.1",
|
|
67
|
+
"@near-wallet-selector/core": "^10.1.0",
|
|
68
|
+
"@types/bun": "^1.3.2",
|
|
69
|
+
"@types/tar": "^6.1.13",
|
|
70
|
+
"lefthook": "^2.0.4",
|
|
71
|
+
"typescript": "^5.9.3"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@napi-rs/keyring": "^1.2.0",
|
|
75
|
+
"@noble/curves": "^2.0.1",
|
|
76
|
+
"@noble/hashes": "^2.0.1",
|
|
77
|
+
"@scure/base": "^2.0.0",
|
|
78
|
+
"@scure/bip32": "^2.0.1",
|
|
79
|
+
"@scure/bip39": "^2.0.1",
|
|
80
|
+
"@zorsh/zorsh": "^0.3.3",
|
|
81
|
+
"tar": "^7.5.2",
|
|
82
|
+
"zod": "^4.1.12"
|
|
83
|
+
}
|
|
13
84
|
}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|