@unicitylabs/sphere-sdk 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect/index.cjs +11 -5
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.cts +4 -1
- package/dist/connect/index.d.ts +4 -1
- package/dist/connect/index.js +11 -5
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +566 -171
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +67 -0
- package/dist/core/index.d.ts +67 -0
- package/dist/core/index.js +566 -171
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +11 -5
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.d.cts +3 -1
- package/dist/impl/browser/connect/index.d.ts +3 -1
- package/dist/impl/browser/connect/index.js +11 -5
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +10 -4
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.d.cts +1 -1
- package/dist/impl/nodejs/connect/index.d.ts +1 -1
- package/dist/impl/nodejs/connect/index.js +10 -4
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.d.cts +11 -0
- package/dist/impl/nodejs/index.d.ts +11 -0
- package/dist/impl/shared/wallet-api/index.d.cts +11 -0
- package/dist/impl/shared/wallet-api/index.d.ts +11 -0
- package/dist/impl/wallet-api-v2/index.cjs +2 -0
- package/dist/impl/wallet-api-v2/index.cjs.map +1 -1
- package/dist/impl/wallet-api-v2/index.d.cts +13 -0
- package/dist/impl/wallet-api-v2/index.d.ts +13 -0
- package/dist/impl/wallet-api-v2/index.js +2 -0
- package/dist/impl/wallet-api-v2/index.js.map +1 -1
- package/dist/index.cjs +566 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +566 -171
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +609 -269
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +88 -13
- package/dist/modules/payments-v2/index.d.ts +88 -13
- package/dist/modules/payments-v2/index.js +609 -269
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/dist/token-engine/index.cjs +132 -34
- package/dist/token-engine/index.cjs.map +1 -1
- package/dist/token-engine/index.d.cts +19 -0
- package/dist/token-engine/index.d.ts +19 -0
- package/dist/token-engine/index.js +132 -34
- package/dist/token-engine/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -221,7 +221,7 @@ var HOST_READY_TIMEOUT = 3e4;
|
|
|
221
221
|
|
|
222
222
|
// connect/protocol.ts
|
|
223
223
|
var SPHERE_CONNECT_NAMESPACE = "sphere-connect";
|
|
224
|
-
var SPHERE_CONNECT_VERSION = "2.
|
|
224
|
+
var SPHERE_CONNECT_VERSION = "2.2";
|
|
225
225
|
var RPC_METHODS = {
|
|
226
226
|
GET_IDENTITY: "sphere_getIdentity",
|
|
227
227
|
GET_BALANCE: "sphere_getBalance",
|
|
@@ -244,7 +244,10 @@ var INTENT_ACTIONS = {
|
|
|
244
244
|
PAYMENT_REQUEST: "payment_request",
|
|
245
245
|
RECEIVE: "receive",
|
|
246
246
|
SIGN_MESSAGE: "sign_message",
|
|
247
|
-
MINT: "mint"
|
|
247
|
+
MINT: "mint",
|
|
248
|
+
// #777: params { to, tokenId, memo? }. Named NFT rather than 'send_token':
|
|
249
|
+
// coins are tokens too, so 'token' does not say which kind moves.
|
|
250
|
+
SEND_NFT: "send_nft"
|
|
248
251
|
};
|
|
249
252
|
var ERROR_CODES = {
|
|
250
253
|
// Standard JSON-RPC
|
|
@@ -334,7 +337,7 @@ function createRequestId() {
|
|
|
334
337
|
}
|
|
335
338
|
|
|
336
339
|
// connect/version.ts
|
|
337
|
-
var SDK_VERSION = "0.
|
|
340
|
+
var SDK_VERSION = "0.17.0";
|
|
338
341
|
|
|
339
342
|
// connect/permissions.ts
|
|
340
343
|
var PERMISSION_SCOPES = {
|
|
@@ -350,7 +353,9 @@ var PERMISSION_SCOPES = {
|
|
|
350
353
|
DM_MANAGE: "dm:manage",
|
|
351
354
|
PAYMENT_REQUEST: "payment:request",
|
|
352
355
|
SIGN_REQUEST: "sign:request",
|
|
353
|
-
MINT_REQUEST: "mint:request"
|
|
356
|
+
MINT_REQUEST: "mint:request",
|
|
357
|
+
/** #777: moving a coinless token (an NFT). Distinct from transfer:request. */
|
|
358
|
+
NFT_TRANSFER: "nft:transfer"
|
|
354
359
|
};
|
|
355
360
|
var ALL_PERMISSIONS = Object.values(PERMISSION_SCOPES);
|
|
356
361
|
var DEFAULT_PERMISSIONS = [
|
|
@@ -377,7 +382,8 @@ var INTENT_PERMISSIONS = {
|
|
|
377
382
|
[INTENT_ACTIONS.PAYMENT_REQUEST]: PERMISSION_SCOPES.PAYMENT_REQUEST,
|
|
378
383
|
[INTENT_ACTIONS.RECEIVE]: PERMISSION_SCOPES.IDENTITY_READ,
|
|
379
384
|
[INTENT_ACTIONS.SIGN_MESSAGE]: PERMISSION_SCOPES.SIGN_REQUEST,
|
|
380
|
-
[INTENT_ACTIONS.MINT]: PERMISSION_SCOPES.MINT_REQUEST
|
|
385
|
+
[INTENT_ACTIONS.MINT]: PERMISSION_SCOPES.MINT_REQUEST,
|
|
386
|
+
[INTENT_ACTIONS.SEND_NFT]: PERMISSION_SCOPES.NFT_TRANSFER
|
|
381
387
|
};
|
|
382
388
|
|
|
383
389
|
// connect/host/payments-compat.ts
|