@piprail/sdk 1.2.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/CHANGELOG.md +26 -0
- package/ERRORS.md +1 -1
- package/README.md +3 -2
- package/dist/aptos-MQY7KOOJ.js +329 -0
- package/dist/aptos-T3MNKUPB.cjs +329 -0
- package/dist/{chunk-DTIJYDG6.js → chunk-AGKC3C7Y.js} +4 -2
- package/dist/{chunk-NK64H3RM.cjs → chunk-YJPWIK5L.cjs} +4 -2
- package/dist/index.cjs +59 -46
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +21 -8
- package/dist/{near-VZ6XGVNJ.cjs → near-DISWUB7Y.cjs} +19 -19
- package/dist/{near-RJUETWY3.js → near-YX3XOASO.js} +1 -1
- package/dist/{solana-USZHRZFN.js → solana-37F2PR5H.js} +1 -1
- package/dist/{solana-CRLWAM7C.cjs → solana-RJPNEFSN.cjs} +14 -14
- package/dist/{stellar-JZBVCLNV.js → stellar-ALOVOMFD.js} +1 -1
- package/dist/{stellar-LIGJKRRK.cjs → stellar-SUGNX52Z.cjs} +20 -20
- package/dist/{sui-JLVWFDOS.cjs → sui-HZWPHVU4.cjs} +17 -17
- package/dist/{sui-UBDATSQV.js → sui-OLC5ID4X.js} +1 -1
- package/dist/{ton-OVSQZ4OM.cjs → ton-C4KTFXDL.cjs} +14 -14
- package/dist/{ton-2N74GKNB.js → ton-NIDWF77T.js} +1 -1
- package/dist/{tron-V3A6L3X3.cjs → tron-DTU7NPEM.cjs} +24 -24
- package/dist/{tron-N3EAAKU7.js → tron-LPMK57H7.js} +1 -1
- package/dist/{xrpl-RTT3UOLX.js → xrpl-6ODQS7JR.js} +1 -1
- package/dist/{xrpl-QECPQCFS.cjs → xrpl-N6ZAJRGC.cjs} +20 -20
- package/package.json +7 -2
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkYJPWIK5Lcjs = require('./chunk-YJPWIK5L.cjs');
|
|
10
|
+
|
|
11
|
+
// src/drivers/aptos/index.ts
|
|
12
|
+
var _tssdk = require('@aptos-labs/ts-sdk');
|
|
13
|
+
|
|
14
|
+
// src/drivers/aptos/chains.ts
|
|
15
|
+
var APT_DECIMALS = 8;
|
|
16
|
+
var APT_SYMBOL = "APT";
|
|
17
|
+
var APT_FA_METADATA = "0xa";
|
|
18
|
+
var APTOS_MAINNET = {
|
|
19
|
+
caip2: "aptos:1",
|
|
20
|
+
defaultRpc: "https://fullnode.mainnet.aptoslabs.com/v1",
|
|
21
|
+
tokens: {
|
|
22
|
+
// Circle USDC — FA metadata + 6 decimals verified live on mainnet
|
|
23
|
+
// (0x1::fungible_asset::Metadata → symbol "USDC", decimals 6) before shipping.
|
|
24
|
+
USDC: {
|
|
25
|
+
metadata: "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b",
|
|
26
|
+
decimals: 6,
|
|
27
|
+
symbol: "USDC"
|
|
28
|
+
},
|
|
29
|
+
// Tether USD₮ — use the FA *metadata* address (NOT the issuer/creator address
|
|
30
|
+
// 0xf73e…73cb). Verified live (Metadata → name "Tether USD", symbol "USDt", decimals 6).
|
|
31
|
+
USDT: {
|
|
32
|
+
metadata: "0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b",
|
|
33
|
+
decimals: 6,
|
|
34
|
+
symbol: "USDT"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/drivers/aptos/pay.ts
|
|
40
|
+
async function payAptos(params) {
|
|
41
|
+
const { client, signer, sender, accept } = params;
|
|
42
|
+
const metadata = accept.asset === "native" ? APT_FA_METADATA : accept.asset;
|
|
43
|
+
try {
|
|
44
|
+
const transaction = await client.build({
|
|
45
|
+
sender,
|
|
46
|
+
data: {
|
|
47
|
+
function: "0x1::primary_fungible_store::transfer",
|
|
48
|
+
typeArguments: ["0x1::fungible_asset::Metadata"],
|
|
49
|
+
// u64 amount goes as a base-unit string; the FA metadata object + recipient are addresses.
|
|
50
|
+
functionArguments: [metadata, accept.payTo, accept.amount]
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const res = await client.signSubmit({ signer, transaction });
|
|
54
|
+
return res.hash;
|
|
55
|
+
} catch (err) {
|
|
56
|
+
if (err instanceof _chunkYJPWIK5Lcjs.InsufficientFundsError) throw err;
|
|
57
|
+
if (isAptosAffordability(err)) {
|
|
58
|
+
throw new (0, _chunkYJPWIK5Lcjs.InsufficientFundsError)(
|
|
59
|
+
err instanceof Error ? err.message : "Insufficient APT/token balance for the payment.",
|
|
60
|
+
{ cause: err }
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
throw _nullishCoalesce(_chunkYJPWIK5Lcjs.toInsufficientFundsError.call(void 0, err), () => ( err));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function isAptosAffordability(err) {
|
|
67
|
+
const m = err instanceof Error ? err.message : String(err);
|
|
68
|
+
return /INSUFFICIENT_BALANCE|EINSUFFICIENT_BALANCE|insufficient.*(balance|gas|funds)|coin store|balance is too low|EINSUFFICIENT/i.test(
|
|
69
|
+
m
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// src/drivers/aptos/verify.ts
|
|
74
|
+
async function verifyAptos(params) {
|
|
75
|
+
const { reader, hash, accept } = params;
|
|
76
|
+
const required = BigInt(accept.amount);
|
|
77
|
+
const wantMetadata = accept.asset === "native" ? APT_FA_METADATA : accept.asset;
|
|
78
|
+
let tx;
|
|
79
|
+
try {
|
|
80
|
+
tx = await reader.getTransaction(hash);
|
|
81
|
+
} catch (e2) {
|
|
82
|
+
return txNotFound(hash);
|
|
83
|
+
}
|
|
84
|
+
if (!tx) return txNotFound(hash);
|
|
85
|
+
if (!tx.success) {
|
|
86
|
+
return { ok: false, error: "tx_reverted", detail: `Aptos tx ${hash} did not succeed.` };
|
|
87
|
+
}
|
|
88
|
+
if (typeof tx.timestampSeconds === "number") {
|
|
89
|
+
const ageSeconds = Math.floor(Date.now() / 1e3) - tx.timestampSeconds;
|
|
90
|
+
if (ageSeconds > accept.maxTimeoutSeconds) {
|
|
91
|
+
return {
|
|
92
|
+
ok: false,
|
|
93
|
+
error: "payment_expired",
|
|
94
|
+
detail: `Payment is ${ageSeconds}s old; max allowed is ${accept.maxTimeoutSeconds}s.`
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let wantStore;
|
|
99
|
+
try {
|
|
100
|
+
wantStore = await reader.primaryStore(accept.payTo, wantMetadata);
|
|
101
|
+
} catch (e3) {
|
|
102
|
+
return txNotFound(hash);
|
|
103
|
+
}
|
|
104
|
+
let paid = 0n;
|
|
105
|
+
for (const d of tx.deposits) {
|
|
106
|
+
if (d.store !== wantStore) continue;
|
|
107
|
+
try {
|
|
108
|
+
paid += BigInt(d.amount);
|
|
109
|
+
} catch (e4) {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (paid < required) {
|
|
114
|
+
return {
|
|
115
|
+
ok: false,
|
|
116
|
+
error: "transfer_not_found",
|
|
117
|
+
detail: `No Aptos transfer of >= ${required} (${wantMetadata}) to ${accept.payTo} in ${hash}.`
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
ok: true,
|
|
122
|
+
receipt: {
|
|
123
|
+
scheme: "onchain-proof",
|
|
124
|
+
success: true,
|
|
125
|
+
network: accept.network,
|
|
126
|
+
transaction: hash,
|
|
127
|
+
asset: accept.asset,
|
|
128
|
+
amount: accept.amount,
|
|
129
|
+
payer: tx.sender,
|
|
130
|
+
payTo: accept.payTo,
|
|
131
|
+
verifiedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function txNotFound(hash) {
|
|
136
|
+
return {
|
|
137
|
+
ok: false,
|
|
138
|
+
error: "tx_not_found",
|
|
139
|
+
detail: `Aptos tx ${hash} not found or not yet propagated \u2014 retry.`
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/drivers/aptos/wallet.ts
|
|
144
|
+
|
|
145
|
+
function assertAptosWallet(wallet, network) {
|
|
146
|
+
if (typeof wallet !== "object" || wallet === null) {
|
|
147
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
148
|
+
`chain ${network} is Aptos; wallet must be { privateKey } (ed25519-priv-0x\u2026) or { account }.`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
if ("walletClient" in wallet) {
|
|
152
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
153
|
+
`chain ${network} is Aptos; a viem { walletClient } can't be used \u2014 pass { privateKey } (ed25519-priv-0x\u2026) or { account }.`
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
if ("secretKey" in wallet || "signer" in wallet || "mnemonic" in wallet || "keypair" in wallet || "keyPair" in wallet || "secret" in wallet || "seed" in wallet || "accountId" in wallet) {
|
|
157
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
158
|
+
`chain ${network} is Aptos; that looks like another family's wallet \u2014 pass { privateKey } (ed25519-priv-0x\u2026) or { account }.`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
if (!("privateKey" in wallet) && !("account" in wallet)) {
|
|
162
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
163
|
+
`chain ${network} is Aptos; wallet must be { privateKey } (ed25519-priv-0x\u2026) or { account }.`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
return wallet;
|
|
167
|
+
}
|
|
168
|
+
function resolveAptosAccount(config) {
|
|
169
|
+
if (config.account) return config.account;
|
|
170
|
+
if (config.privateKey != null) {
|
|
171
|
+
try {
|
|
172
|
+
return _tssdk.Account.fromPrivateKey({ privateKey: new (0, _tssdk.Ed25519PrivateKey)(config.privateKey) });
|
|
173
|
+
} catch (cause) {
|
|
174
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
175
|
+
"Aptos wallet { privateKey } is not a valid ed25519 secret (ed25519-priv-0x\u2026 or 0x\u2026 hex).",
|
|
176
|
+
{ cause }
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)("Aptos wallet needs { privateKey } (ed25519-priv-0x\u2026) or { account }.");
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/drivers/aptos/index.ts
|
|
184
|
+
var aptosDriver = {
|
|
185
|
+
family: "aptos",
|
|
186
|
+
resolve(opts) {
|
|
187
|
+
if (opts.chain !== "aptos") return null;
|
|
188
|
+
const rpcUrl = _nullishCoalesce(opts.rpcUrl, () => ( APTOS_MAINNET.defaultRpc));
|
|
189
|
+
return makeAptosNetwork(APTOS_MAINNET, rpcUrl);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
function norm(addr) {
|
|
193
|
+
try {
|
|
194
|
+
return _tssdk.AccountAddress.from(addr).toString();
|
|
195
|
+
} catch (e5) {
|
|
196
|
+
return addr;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function makeAptosNetwork(preset, rpcUrl) {
|
|
200
|
+
const aptos = new (0, _tssdk.Aptos)(new (0, _tssdk.AptosConfig)({ network: _tssdk.Network.MAINNET, fullnode: rpcUrl }));
|
|
201
|
+
const network = preset.caip2;
|
|
202
|
+
const reader = {
|
|
203
|
+
async getTransaction(hash) {
|
|
204
|
+
const tx = await aptos.getTransactionByHash({ transactionHash: hash });
|
|
205
|
+
if (!tx || tx.type !== "user_transaction") return null;
|
|
206
|
+
const deposits = (_nullishCoalesce(tx.events, () => ( []))).filter((e) => e.type === "0x1::fungible_asset::Deposit").map((e) => ({ store: norm(String(e.data.store)), amount: String(e.data.amount) }));
|
|
207
|
+
return {
|
|
208
|
+
success: tx.success === true,
|
|
209
|
+
// Aptos timestamps are microseconds since epoch.
|
|
210
|
+
timestampSeconds: tx.timestamp != null ? Math.floor(Number(tx.timestamp) / 1e6) : void 0,
|
|
211
|
+
sender: tx.sender ? norm(String(tx.sender)) : "",
|
|
212
|
+
deposits
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
async primaryStore(owner, metadata) {
|
|
216
|
+
const [addr] = await aptos.view({
|
|
217
|
+
payload: {
|
|
218
|
+
function: "0x1::primary_fungible_store::primary_store_address",
|
|
219
|
+
typeArguments: ["0x1::fungible_asset::Metadata"],
|
|
220
|
+
functionArguments: [owner, metadata]
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
return norm(String(addr));
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const payClient = {
|
|
227
|
+
build: (input) => aptos.transaction.build.simple({
|
|
228
|
+
sender: input.sender,
|
|
229
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
230
|
+
data: input.data
|
|
231
|
+
}),
|
|
232
|
+
signSubmit: (input) => aptos.signAndSubmitTransaction({
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
234
|
+
signer: input.signer,
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
236
|
+
transaction: input.transaction
|
|
237
|
+
})
|
|
238
|
+
};
|
|
239
|
+
return {
|
|
240
|
+
family: "aptos",
|
|
241
|
+
network,
|
|
242
|
+
supports: (n) => n === network,
|
|
243
|
+
resolveToken(token) {
|
|
244
|
+
if (token === "native") {
|
|
245
|
+
return { asset: "native", decimals: APT_DECIMALS, symbol: APT_SYMBOL };
|
|
246
|
+
}
|
|
247
|
+
if (typeof token === "string") {
|
|
248
|
+
const info = preset.tokens[token.toUpperCase()];
|
|
249
|
+
if (!info) {
|
|
250
|
+
const known = Object.keys(preset.tokens).join(", ") || "(none built in)";
|
|
251
|
+
throw new (0, _chunkYJPWIK5Lcjs.UnknownTokenError)(
|
|
252
|
+
`token "${token}" isn't built in for Aptos (known: ${known}). Pass { metadata, decimals } for a custom Fungible Asset, or use 'native'.`
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
return { asset: info.metadata, decimals: info.decimals, symbol: info.symbol };
|
|
256
|
+
}
|
|
257
|
+
_chunkYJPWIK5Lcjs.rejectForeignToken.call(void 0, token, "aptos", network);
|
|
258
|
+
const t = token;
|
|
259
|
+
if (!t.metadata || typeof t.decimals !== "number") {
|
|
260
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
261
|
+
`chain ${network} is Aptos; a custom token must be { metadata, decimals }.`
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
asset: t.metadata,
|
|
266
|
+
decimals: t.decimals,
|
|
267
|
+
...t.symbol ? { symbol: t.symbol } : {}
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
describeAsset(asset) {
|
|
271
|
+
if (asset === "native") return { symbol: APT_SYMBOL, decimals: APT_DECIMALS };
|
|
272
|
+
for (const info of Object.values(preset.tokens)) {
|
|
273
|
+
if (info.metadata === asset) return { symbol: info.symbol, decimals: info.decimals };
|
|
274
|
+
}
|
|
275
|
+
return null;
|
|
276
|
+
},
|
|
277
|
+
assertValidPayTo(payTo) {
|
|
278
|
+
const evmLike = /^0x[0-9a-fA-F]{40}$/.test(payTo);
|
|
279
|
+
let valid = false;
|
|
280
|
+
try {
|
|
281
|
+
_tssdk.AccountAddress.from(payTo);
|
|
282
|
+
valid = true;
|
|
283
|
+
} catch (e6) {
|
|
284
|
+
valid = false;
|
|
285
|
+
}
|
|
286
|
+
if (!valid || evmLike) {
|
|
287
|
+
throw new (0, _chunkYJPWIK5Lcjs.WrongFamilyError)(
|
|
288
|
+
`chain ${network} is Aptos, but payTo "${payTo}" is not a valid Aptos address (0x + 32 bytes).`
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
bindWallet(wallet) {
|
|
293
|
+
return { _native: assertAptosWallet(wallet, network) };
|
|
294
|
+
},
|
|
295
|
+
async send(wallet, accept) {
|
|
296
|
+
const account = resolveAptosAccount(wallet._native);
|
|
297
|
+
return payAptos({
|
|
298
|
+
client: payClient,
|
|
299
|
+
signer: account,
|
|
300
|
+
sender: account.accountAddress.toString(),
|
|
301
|
+
accept
|
|
302
|
+
});
|
|
303
|
+
},
|
|
304
|
+
async confirm(ref) {
|
|
305
|
+
try {
|
|
306
|
+
const tx = await aptos.waitForTransaction({ transactionHash: ref });
|
|
307
|
+
return { height: String(_nullishCoalesce(tx.version, () => ( "0"))) };
|
|
308
|
+
} catch (err) {
|
|
309
|
+
throw new (0, _chunkYJPWIK5Lcjs.ConfirmationTimeoutError)(`Aptos tx ${ref} did not finalize in time.`, { cause: err });
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
async estimateCost() {
|
|
313
|
+
return _chunkYJPWIK5Lcjs.nativeCost.call(void 0, {
|
|
314
|
+
symbol: APT_SYMBOL,
|
|
315
|
+
decimals: APT_DECIMALS,
|
|
316
|
+
fee: 100000n,
|
|
317
|
+
// ~0.001 APT
|
|
318
|
+
basis: "heuristic",
|
|
319
|
+
detail: "\u22480.001 APT (a simple Fungible-Asset transfer; Aptos gas is sub-cent)"
|
|
320
|
+
});
|
|
321
|
+
},
|
|
322
|
+
async verify(ref, accept) {
|
|
323
|
+
return verifyAptos({ reader, hash: ref, accept });
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
exports.aptosDriver = aptosDriver;
|
|
@@ -81,7 +81,8 @@ var FAMILY_LABEL = {
|
|
|
81
81
|
xrpl: "XRPL",
|
|
82
82
|
tron: "Tron",
|
|
83
83
|
sui: "Sui",
|
|
84
|
-
near: "NEAR"
|
|
84
|
+
near: "NEAR",
|
|
85
|
+
aptos: "Aptos"
|
|
85
86
|
};
|
|
86
87
|
var FAMILY_TOKEN = {
|
|
87
88
|
evm: { key: "address", shape: "{ address }", hint: "{ address, decimals }" },
|
|
@@ -91,7 +92,8 @@ var FAMILY_TOKEN = {
|
|
|
91
92
|
xrpl: { key: "currencyHex", shape: "{ issuer, currencyHex }", hint: "{ issuer, currencyHex, decimals }" },
|
|
92
93
|
tron: { key: "address", shape: "{ address }", hint: "{ address, decimals }" },
|
|
93
94
|
sui: { key: "coinType", shape: "{ coinType }", hint: "{ coinType, decimals }" },
|
|
94
|
-
near: { key: "contractId", shape: "{ contractId }", hint: "{ contractId, decimals }" }
|
|
95
|
+
near: { key: "contractId", shape: "{ contractId }", hint: "{ contractId, decimals }" },
|
|
96
|
+
aptos: { key: "metadata", shape: "{ metadata }", hint: "{ metadata, decimals }" }
|
|
95
97
|
};
|
|
96
98
|
function rejectForeignToken(token, family, network) {
|
|
97
99
|
const own = FAMILY_TOKEN[family];
|
|
@@ -81,7 +81,8 @@ var FAMILY_LABEL = {
|
|
|
81
81
|
xrpl: "XRPL",
|
|
82
82
|
tron: "Tron",
|
|
83
83
|
sui: "Sui",
|
|
84
|
-
near: "NEAR"
|
|
84
|
+
near: "NEAR",
|
|
85
|
+
aptos: "Aptos"
|
|
85
86
|
};
|
|
86
87
|
var FAMILY_TOKEN = {
|
|
87
88
|
evm: { key: "address", shape: "{ address }", hint: "{ address, decimals }" },
|
|
@@ -91,7 +92,8 @@ var FAMILY_TOKEN = {
|
|
|
91
92
|
xrpl: { key: "currencyHex", shape: "{ issuer, currencyHex }", hint: "{ issuer, currencyHex, decimals }" },
|
|
92
93
|
tron: { key: "address", shape: "{ address }", hint: "{ address, decimals }" },
|
|
93
94
|
sui: { key: "coinType", shape: "{ coinType }", hint: "{ coinType, decimals }" },
|
|
94
|
-
near: { key: "contractId", shape: "{ contractId }", hint: "{ contractId, decimals }" }
|
|
95
|
+
near: { key: "contractId", shape: "{ contractId }", hint: "{ contractId, decimals }" },
|
|
96
|
+
aptos: { key: "metadata", shape: "{ metadata }", hint: "{ metadata, decimals }" }
|
|
95
97
|
};
|
|
96
98
|
function rejectForeignToken(token, family, network) {
|
|
97
99
|
const own = FAMILY_TOKEN[family];
|