@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
|
@@ -14,7 +14,7 @@ interface NetworkInfo {
|
|
|
14
14
|
* JSON-RPC-like message types for wallet ↔ dApp communication.
|
|
15
15
|
*/
|
|
16
16
|
declare const SPHERE_CONNECT_NAMESPACE = "sphere-connect";
|
|
17
|
-
declare const SPHERE_CONNECT_VERSION = "2.
|
|
17
|
+
declare const SPHERE_CONNECT_VERSION = "2.2";
|
|
18
18
|
interface SphereMessageBase {
|
|
19
19
|
readonly ns: typeof SPHERE_CONNECT_NAMESPACE;
|
|
20
20
|
readonly v: typeof SPHERE_CONNECT_VERSION;
|
|
@@ -14,7 +14,7 @@ interface NetworkInfo {
|
|
|
14
14
|
* JSON-RPC-like message types for wallet ↔ dApp communication.
|
|
15
15
|
*/
|
|
16
16
|
declare const SPHERE_CONNECT_NAMESPACE = "sphere-connect";
|
|
17
|
-
declare const SPHERE_CONNECT_VERSION = "2.
|
|
17
|
+
declare const SPHERE_CONNECT_VERSION = "2.2";
|
|
18
18
|
interface SphereMessageBase {
|
|
19
19
|
readonly ns: typeof SPHERE_CONNECT_NAMESPACE;
|
|
20
20
|
readonly v: typeof SPHERE_CONNECT_VERSION;
|
|
@@ -185,7 +185,7 @@ var SPHERE_NETWORKS = {
|
|
|
185
185
|
|
|
186
186
|
// connect/protocol.ts
|
|
187
187
|
var SPHERE_CONNECT_NAMESPACE = "sphere-connect";
|
|
188
|
-
var SPHERE_CONNECT_VERSION = "2.
|
|
188
|
+
var SPHERE_CONNECT_VERSION = "2.2";
|
|
189
189
|
var RPC_METHODS = {
|
|
190
190
|
GET_IDENTITY: "sphere_getIdentity",
|
|
191
191
|
GET_BALANCE: "sphere_getBalance",
|
|
@@ -208,7 +208,10 @@ var INTENT_ACTIONS = {
|
|
|
208
208
|
PAYMENT_REQUEST: "payment_request",
|
|
209
209
|
RECEIVE: "receive",
|
|
210
210
|
SIGN_MESSAGE: "sign_message",
|
|
211
|
-
MINT: "mint"
|
|
211
|
+
MINT: "mint",
|
|
212
|
+
// #777: params { to, tokenId, memo? }. Named NFT rather than 'send_token':
|
|
213
|
+
// coins are tokens too, so 'token' does not say which kind moves.
|
|
214
|
+
SEND_NFT: "send_nft"
|
|
212
215
|
};
|
|
213
216
|
var ERROR_CODES = {
|
|
214
217
|
// Standard JSON-RPC
|
|
@@ -302,7 +305,9 @@ var PERMISSION_SCOPES = {
|
|
|
302
305
|
DM_MANAGE: "dm:manage",
|
|
303
306
|
PAYMENT_REQUEST: "payment:request",
|
|
304
307
|
SIGN_REQUEST: "sign:request",
|
|
305
|
-
MINT_REQUEST: "mint:request"
|
|
308
|
+
MINT_REQUEST: "mint:request",
|
|
309
|
+
/** #777: moving a coinless token (an NFT). Distinct from transfer:request. */
|
|
310
|
+
NFT_TRANSFER: "nft:transfer"
|
|
306
311
|
};
|
|
307
312
|
var ALL_PERMISSIONS = Object.values(PERMISSION_SCOPES);
|
|
308
313
|
var DEFAULT_PERMISSIONS = [
|
|
@@ -329,7 +334,8 @@ var INTENT_PERMISSIONS = {
|
|
|
329
334
|
[INTENT_ACTIONS.PAYMENT_REQUEST]: PERMISSION_SCOPES.PAYMENT_REQUEST,
|
|
330
335
|
[INTENT_ACTIONS.RECEIVE]: PERMISSION_SCOPES.IDENTITY_READ,
|
|
331
336
|
[INTENT_ACTIONS.SIGN_MESSAGE]: PERMISSION_SCOPES.SIGN_REQUEST,
|
|
332
|
-
[INTENT_ACTIONS.MINT]: PERMISSION_SCOPES.MINT_REQUEST
|
|
337
|
+
[INTENT_ACTIONS.MINT]: PERMISSION_SCOPES.MINT_REQUEST,
|
|
338
|
+
[INTENT_ACTIONS.SEND_NFT]: PERMISSION_SCOPES.NFT_TRANSFER
|
|
333
339
|
};
|
|
334
340
|
|
|
335
341
|
// connect/host/payments-compat.ts
|