@unicitylabs/sphere-sdk 0.15.0 → 0.16.0-dev.2
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 +15 -5
- package/dist/connect/index.cjs +26 -25
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.cts +4 -0
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/index.js +26 -25
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +728 -227
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +174 -23
- package/dist/core/index.d.ts +174 -23
- package/dist/core/index.js +728 -226
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +16 -25
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +16 -25
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +333 -506
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +333 -506
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +15 -24
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +15 -24
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +300 -571
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +92 -15
- package/dist/impl/nodejs/index.d.ts +92 -15
- package/dist/impl/nodejs/index.js +300 -571
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/impl/shared/wallet-api/index.d.cts +54 -2
- package/dist/impl/shared/wallet-api/index.d.ts +54 -2
- package/dist/index.cjs +730 -227
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +229 -110
- package/dist/index.d.ts +229 -110
- package/dist/index.js +730 -226
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +11 -7
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +56 -3
- package/dist/modules/payments-v2/index.d.ts +56 -3
- package/dist/modules/payments-v2/index.js +11 -7
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/dist/token-engine/index.cjs +46 -0
- package/dist/token-engine/index.cjs.map +1 -1
- package/dist/token-engine/index.js +46 -0
- package/dist/token-engine/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -163,17 +163,8 @@ var NETWORK_SCOPED_ADDRESS_PREFIXES = [
|
|
|
163
163
|
"inv_ledger:"
|
|
164
164
|
// AccountingModule INV_LEDGER_PREFIX
|
|
165
165
|
];
|
|
166
|
-
var DEFAULT_NOSTR_RELAYS = [
|
|
167
|
-
"wss://relay.unicity.network",
|
|
168
|
-
"wss://relay.damus.io",
|
|
169
|
-
"wss://nos.lol",
|
|
170
|
-
"wss://relay.nostr.band"
|
|
171
|
-
];
|
|
172
|
-
var DEFAULT_AGGREGATOR_URL = "https://aggregator.unicity.network/rpc";
|
|
173
|
-
var DEV_AGGREGATOR_URL = "https://dev-aggregator.dyndns.org/rpc";
|
|
174
166
|
var DEFAULT_BASE_PATH = "m/44'/0'/0'";
|
|
175
167
|
var DEFAULT_DERIVATION_PATH = `${DEFAULT_BASE_PATH}/0/0`;
|
|
176
|
-
var TOKEN_REGISTRY_URL = "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet.json";
|
|
177
168
|
var TEST_NOSTR_RELAYS = [
|
|
178
169
|
"wss://nostr-relay.testnet.unicity.network"
|
|
179
170
|
];
|
|
@@ -183,16 +174,25 @@ var DEFAULT_GROUP_RELAYS = [
|
|
|
183
174
|
var NETWORKS = {
|
|
184
175
|
mainnet: {
|
|
185
176
|
name: "Mainnet",
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
networkId: 1,
|
|
178
|
+
// v3 state-transition gateway (networkId 1 comes from the trust base). apiKey is env-injected;
|
|
179
|
+
// unlike testnet2's, a mainnet gateway key is a SECRET — never commit one.
|
|
180
|
+
aggregatorUrl: "https://gateway.mainnet.unicity.network",
|
|
181
|
+
// Mainnet has no relay of its own yet — it shares the testnet relay until one is stood up.
|
|
182
|
+
// Consequence while shared: nametag bindings for both networks live in ONE namespace, and
|
|
183
|
+
// since bindings carry no network the cross-network recipient guard can only signal (#734).
|
|
184
|
+
nostrRelays: TEST_NOSTR_RELAYS,
|
|
188
185
|
groupRelays: DEFAULT_GROUP_RELAYS,
|
|
189
|
-
|
|
186
|
+
// Published, but currently only the non-fungible base token type — no fungible
|
|
187
|
+
// coins yet, so those still miss the registry (decimals 0, symbol falls back to
|
|
188
|
+
// six hex chars). Presentation only: the money path treats coinId as opaque bytes.
|
|
189
|
+
tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.mainnet.json"
|
|
190
190
|
},
|
|
191
191
|
// v1 cutover: 'testnet' now POINTS AT TESTNET2 (the v2 gateway network). The
|
|
192
192
|
// old goggregator testnet spoke the removed v1 protocol — a v2 engine cannot
|
|
193
193
|
// run against it. 'testnet2' stays as an alias of the same configuration.
|
|
194
194
|
testnet: {
|
|
195
|
-
name: "
|
|
195
|
+
name: "Testnet",
|
|
196
196
|
networkId: 4,
|
|
197
197
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
198
198
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -202,7 +202,7 @@ var NETWORKS = {
|
|
|
202
202
|
tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json"
|
|
203
203
|
},
|
|
204
204
|
testnet2: {
|
|
205
|
-
name: "
|
|
205
|
+
name: "Testnet",
|
|
206
206
|
networkId: 4,
|
|
207
207
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
208
208
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -210,19 +210,10 @@ var NETWORKS = {
|
|
|
210
210
|
// reuse testnet infra (shared relays/ipfs)
|
|
211
211
|
groupRelays: DEFAULT_GROUP_RELAYS,
|
|
212
212
|
tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json"
|
|
213
|
-
},
|
|
214
|
-
// NOTE: mainnet/dev still point at v1-era aggregators. The v2 engine cannot
|
|
215
|
-
// operate against them until their gateways are cut over to the v2 protocol —
|
|
216
|
-
// wallet operations on these networks fail loudly (AGGREGATOR_ERROR) until then.
|
|
217
|
-
dev: {
|
|
218
|
-
name: "Development",
|
|
219
|
-
aggregatorUrl: DEV_AGGREGATOR_URL,
|
|
220
|
-
nostrRelays: TEST_NOSTR_RELAYS,
|
|
221
|
-
groupRelays: DEFAULT_GROUP_RELAYS,
|
|
222
|
-
tokenRegistryUrl: TOKEN_REGISTRY_URL
|
|
223
213
|
}
|
|
224
214
|
};
|
|
225
215
|
var SPHERE_NETWORKS = {
|
|
216
|
+
mainnet: { id: NETWORKS.mainnet.networkId, name: "mainnet" },
|
|
226
217
|
testnet2: { id: NETWORKS.testnet2.networkId, name: "testnet2" }
|
|
227
218
|
};
|
|
228
219
|
var HOST_READY_TYPE = "sphere-connect:host-ready";
|
|
@@ -343,7 +334,7 @@ function createRequestId() {
|
|
|
343
334
|
}
|
|
344
335
|
|
|
345
336
|
// connect/version.ts
|
|
346
|
-
var SDK_VERSION = "0.
|
|
337
|
+
var SDK_VERSION = "0.16.0-dev.2";
|
|
347
338
|
|
|
348
339
|
// connect/permissions.ts
|
|
349
340
|
var PERMISSION_SCOPES = {
|