zcashname-sdk 0.8.0 → 0.8.1
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/zns.cjs +4 -1
- package/dist/zns.d.cts +4 -1
- package/dist/zns.d.ts +4 -1
- package/dist/zns.js +3 -1
- package/package.json +1 -1
package/dist/zns.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var zns_exports = {};
|
|
|
32
32
|
__export(zns_exports, {
|
|
33
33
|
BUY_COMMISSION: () => BUY_COMMISSION,
|
|
34
34
|
DEFAULT_URL: () => DEFAULT_URL,
|
|
35
|
+
LIST_COMMISSION: () => LIST_COMMISSION,
|
|
35
36
|
MAINNET_UIVK: () => MAINNET_UIVK,
|
|
36
37
|
TESTNET_UIVK: () => TESTNET_UIVK,
|
|
37
38
|
ZNS: () => ZNS
|
|
@@ -42,6 +43,7 @@ var import_bech32 = require("bech32");
|
|
|
42
43
|
|
|
43
44
|
// src/types.ts
|
|
44
45
|
var BUY_COMMISSION = 1e4;
|
|
46
|
+
var LIST_COMMISSION = 1e6;
|
|
45
47
|
|
|
46
48
|
// src/zns.ts
|
|
47
49
|
var DEFAULT_URL = "https://light.zcash.me/zns-testnet";
|
|
@@ -246,7 +248,7 @@ var ZNS = class {
|
|
|
246
248
|
payload: `LIST:${name}:${price}:${pay_taddr}:${nonce}`,
|
|
247
249
|
complete: (signature, userPubkey) => {
|
|
248
250
|
const memo = userPubkey ? `ZNS:LIST:${name}:${price}:${pay_taddr}:${nonce}:${signature}:${userPubkey}` : `ZNS:LIST:${name}:${price}:${pay_taddr}:${nonce}:${signature}`;
|
|
249
|
-
return { memo, uri: this.buildZcashUri(this.registryAddress,
|
|
251
|
+
return { memo, uri: this.buildZcashUri(this.registryAddress, LIST_COMMISSION, memo) };
|
|
250
252
|
}
|
|
251
253
|
};
|
|
252
254
|
}
|
|
@@ -411,6 +413,7 @@ var ZNS = class {
|
|
|
411
413
|
0 && (module.exports = {
|
|
412
414
|
BUY_COMMISSION,
|
|
413
415
|
DEFAULT_URL,
|
|
416
|
+
LIST_COMMISSION,
|
|
414
417
|
MAINNET_UIVK,
|
|
415
418
|
TESTNET_UIVK,
|
|
416
419
|
ZNS
|
package/dist/zns.d.cts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
type Zats = number;
|
|
5
5
|
/** Commission sent with a BUY claim memo (0.0001 ZEC = 10,000 zats). */
|
|
6
6
|
declare const BUY_COMMISSION: Zats;
|
|
7
|
+
/** Listing commission sent with a LIST memo (0.01 ZEC = 1,000,000 zats).
|
|
8
|
+
* Mirrors the indexer's formula: min_tier × 1000. */
|
|
9
|
+
declare const LIST_COMMISSION: Zats;
|
|
7
10
|
interface Registration {
|
|
8
11
|
name: string;
|
|
9
12
|
address: string;
|
|
@@ -243,4 +246,4 @@ declare class ZNS {
|
|
|
243
246
|
private rpc;
|
|
244
247
|
}
|
|
245
248
|
|
|
246
|
-
export { BUY_COMMISSION, type CompletedAction, DEFAULT_URL, type Event, type EventAction, type EventsFilter, type EventsResult, type LastAction, type Listing, MAINNET_UIVK, type Network, type PendingBuy, type PreparedBuy, type PreparedClaim, type PreparedDelist, type PreparedList, type PreparedRelease, type PreparedSetPrice, type PreparedUpdate, type Pricing, type Registration, type Status, TESTNET_UIVK, ZNS, type Zats };
|
|
249
|
+
export { BUY_COMMISSION, type CompletedAction, DEFAULT_URL, type Event, type EventAction, type EventsFilter, type EventsResult, LIST_COMMISSION, type LastAction, type Listing, MAINNET_UIVK, type Network, type PendingBuy, type PreparedBuy, type PreparedClaim, type PreparedDelist, type PreparedList, type PreparedRelease, type PreparedSetPrice, type PreparedUpdate, type Pricing, type Registration, type Status, TESTNET_UIVK, ZNS, type Zats };
|
package/dist/zns.d.ts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
type Zats = number;
|
|
5
5
|
/** Commission sent with a BUY claim memo (0.0001 ZEC = 10,000 zats). */
|
|
6
6
|
declare const BUY_COMMISSION: Zats;
|
|
7
|
+
/** Listing commission sent with a LIST memo (0.01 ZEC = 1,000,000 zats).
|
|
8
|
+
* Mirrors the indexer's formula: min_tier × 1000. */
|
|
9
|
+
declare const LIST_COMMISSION: Zats;
|
|
7
10
|
interface Registration {
|
|
8
11
|
name: string;
|
|
9
12
|
address: string;
|
|
@@ -243,4 +246,4 @@ declare class ZNS {
|
|
|
243
246
|
private rpc;
|
|
244
247
|
}
|
|
245
248
|
|
|
246
|
-
export { BUY_COMMISSION, type CompletedAction, DEFAULT_URL, type Event, type EventAction, type EventsFilter, type EventsResult, type LastAction, type Listing, MAINNET_UIVK, type Network, type PendingBuy, type PreparedBuy, type PreparedClaim, type PreparedDelist, type PreparedList, type PreparedRelease, type PreparedSetPrice, type PreparedUpdate, type Pricing, type Registration, type Status, TESTNET_UIVK, ZNS, type Zats };
|
|
249
|
+
export { BUY_COMMISSION, type CompletedAction, DEFAULT_URL, type Event, type EventAction, type EventsFilter, type EventsResult, LIST_COMMISSION, type LastAction, type Listing, MAINNET_UIVK, type Network, type PendingBuy, type PreparedBuy, type PreparedClaim, type PreparedDelist, type PreparedList, type PreparedRelease, type PreparedSetPrice, type PreparedUpdate, type Pricing, type Registration, type Status, TESTNET_UIVK, ZNS, type Zats };
|
package/dist/zns.js
CHANGED
|
@@ -4,6 +4,7 @@ import { bech32m } from "bech32";
|
|
|
4
4
|
|
|
5
5
|
// src/types.ts
|
|
6
6
|
var BUY_COMMISSION = 1e4;
|
|
7
|
+
var LIST_COMMISSION = 1e6;
|
|
7
8
|
|
|
8
9
|
// src/zns.ts
|
|
9
10
|
var DEFAULT_URL = "https://light.zcash.me/zns-testnet";
|
|
@@ -208,7 +209,7 @@ var ZNS = class {
|
|
|
208
209
|
payload: `LIST:${name}:${price}:${pay_taddr}:${nonce}`,
|
|
209
210
|
complete: (signature, userPubkey) => {
|
|
210
211
|
const memo = userPubkey ? `ZNS:LIST:${name}:${price}:${pay_taddr}:${nonce}:${signature}:${userPubkey}` : `ZNS:LIST:${name}:${price}:${pay_taddr}:${nonce}:${signature}`;
|
|
211
|
-
return { memo, uri: this.buildZcashUri(this.registryAddress,
|
|
212
|
+
return { memo, uri: this.buildZcashUri(this.registryAddress, LIST_COMMISSION, memo) };
|
|
212
213
|
}
|
|
213
214
|
};
|
|
214
215
|
}
|
|
@@ -372,6 +373,7 @@ var ZNS = class {
|
|
|
372
373
|
export {
|
|
373
374
|
BUY_COMMISSION,
|
|
374
375
|
DEFAULT_URL,
|
|
376
|
+
LIST_COMMISSION,
|
|
375
377
|
MAINNET_UIVK,
|
|
376
378
|
TESTNET_UIVK,
|
|
377
379
|
ZNS
|