@chainvue/verus-sdk 0.7.0 → 0.9.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/VerusSDK.d.ts +4 -1
- package/dist/VerusSDK.d.ts.map +1 -1
- package/dist/VerusSDK.js +6 -2
- package/dist/VerusSDK.js.map +1 -1
- package/dist/bundle.js +495 -273
- package/dist/core/brands.d.ts +31 -0
- package/dist/core/brands.d.ts.map +1 -0
- package/dist/core/brands.js +82 -0
- package/dist/core/brands.js.map +1 -0
- package/dist/currency/index.d.ts.map +1 -1
- package/dist/currency/index.js +6 -1
- package/dist/currency/index.js.map +1 -1
- package/dist/identity/index.d.ts +46 -28
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +253 -78
- package/dist/identity/index.js.map +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +9 -0
- package/dist/keys/index.js.map +1 -1
- package/dist/signing/index.d.ts +12 -3
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/index.js +17 -4
- package/dist/signing/index.js.map +1 -1
- package/dist/transfer/index.d.ts.map +1 -1
- package/dist/transfer/index.js +9 -2
- package/dist/transfer/index.js.map +1 -1
- package/dist/types/index.d.ts +26 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utxo/index.d.ts +14 -0
- package/dist/utxo/index.d.ts.map +1 -1
- package/dist/utxo/index.js +49 -0
- package/dist/utxo/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const brand: unique symbol;
|
|
2
|
+
type Brand<T, B extends string> = T & {
|
|
3
|
+
readonly [brand]: B;
|
|
4
|
+
};
|
|
5
|
+
/** Transparent R-address (version 0x3c, pubkey-hash). */
|
|
6
|
+
export type RAddress = Brand<string, 'RAddress'>;
|
|
7
|
+
/** Identity i-address (version 0x66) — identities AND currency ids (offline-indistinguishable). */
|
|
8
|
+
export type IAddress = Brand<string, 'IAddress'>;
|
|
9
|
+
/** P2SH address (version 0x55). */
|
|
10
|
+
export type P2shAddress = Brand<string, 'P2shAddress'>;
|
|
11
|
+
/** Any parsed base58check address of a known kind. */
|
|
12
|
+
export type Address = RAddress | IAddress | P2shAddress;
|
|
13
|
+
/**
|
|
14
|
+
* Documentation alias: a currency id IS an i-address. There is deliberately no
|
|
15
|
+
* separate `CurrencyId` brand — an offline SDK cannot tell an i-address naming a
|
|
16
|
+
* currency from one naming an identity, so a distinct brand would be a lie the
|
|
17
|
+
* type system can't check and would force unsafe casts.
|
|
18
|
+
*/
|
|
19
|
+
export type CurrencyId = IAddress;
|
|
20
|
+
/** Parse a transparent R-address; throws InvalidAddressError otherwise. */
|
|
21
|
+
export declare function parseRAddress(s: string, label?: string): RAddress;
|
|
22
|
+
/** Parse an identity/currency i-address; throws InvalidAddressError otherwise. */
|
|
23
|
+
export declare function parseIAddress(s: string, label?: string): IAddress;
|
|
24
|
+
/** Parse any supported address into the discriminated union; throws otherwise. */
|
|
25
|
+
export declare function parseAddress(s: string, label?: string): Address;
|
|
26
|
+
/** Narrow an Address to an i-address by its version byte (replaces startsWith('i')). */
|
|
27
|
+
export declare function isIAddress(a: Address): a is IAddress;
|
|
28
|
+
/** Narrow an Address to an R-address by its version byte. */
|
|
29
|
+
export declare function isRAddress(a: Address): a is RAddress;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=brands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../src/core/brands.ts"],"names":[],"mappings":"AAmBA,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AACnC,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC;AAE9D,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACjD,mGAAmG;AACnG,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACjD,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACvD,sDAAsD;AACtD,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;AAkBlC,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,QAAQ,CAMpE;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,QAAQ,CAMpE;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,OAAO,CAYlE;AAED,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAEpD;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAEpD"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseRAddress = parseRAddress;
|
|
7
|
+
exports.parseIAddress = parseIAddress;
|
|
8
|
+
exports.parseAddress = parseAddress;
|
|
9
|
+
exports.isIAddress = isIAddress;
|
|
10
|
+
exports.isRAddress = isRAddress;
|
|
11
|
+
/**
|
|
12
|
+
* Branded domain types + parse-don't-validate constructors.
|
|
13
|
+
*
|
|
14
|
+
* The address-version-laundering bug class (KeyID/IdentityID.fromAddress and
|
|
15
|
+
* fromBase58Check discard the version byte) was defended by scattering
|
|
16
|
+
* assertAddressVersion at each call site. Brands move that guarantee into the
|
|
17
|
+
* type system: once an internal function's signature demands an `IAddress`, a
|
|
18
|
+
* raw `string` (or an `RAddress`) cannot be passed — the compiler rejects it,
|
|
19
|
+
* and a forgotten check is a build error instead of a live-testnet discovery.
|
|
20
|
+
*
|
|
21
|
+
* Brands are structural subtypes of `string`, so a value already flows into the
|
|
22
|
+
* fork's constructors with zero casts; the only way to MINT one is through a
|
|
23
|
+
* parser here, which validates the version byte. No fork imports (uses bs58check
|
|
24
|
+
* directly), so this stays at the dependency-free core.
|
|
25
|
+
*/
|
|
26
|
+
const bs58check_1 = __importDefault(require("bs58check"));
|
|
27
|
+
const index_js_1 = require("../constants/index.js");
|
|
28
|
+
const errors_js_1 = require("../errors.js");
|
|
29
|
+
const P2SH_VERSION = 0x55;
|
|
30
|
+
/** Decode a base58check string to its version byte + 20-byte hash, or throw typed. */
|
|
31
|
+
function decode(s, label) {
|
|
32
|
+
let decoded;
|
|
33
|
+
try {
|
|
34
|
+
decoded = bs58check_1.default.decode(s);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
throw new errors_js_1.InvalidAddressError(String(s), `${label} is not valid base58check: ${err.message}`);
|
|
38
|
+
}
|
|
39
|
+
if (decoded.length !== 21) {
|
|
40
|
+
throw new errors_js_1.InvalidAddressError(String(s), `${label} must decode to a 1-byte version + 20-byte hash, got ${decoded.length} bytes`);
|
|
41
|
+
}
|
|
42
|
+
return { version: decoded[0] };
|
|
43
|
+
}
|
|
44
|
+
/** Parse a transparent R-address; throws InvalidAddressError otherwise. */
|
|
45
|
+
function parseRAddress(s, label = 'address') {
|
|
46
|
+
const { version } = decode(s, label);
|
|
47
|
+
if (version !== index_js_1.PUBKEY_HASH_PREFIX) {
|
|
48
|
+
throw new errors_js_1.InvalidAddressError(s, `${label} must be an R-address (version ${index_js_1.PUBKEY_HASH_PREFIX}), got version ${version}`);
|
|
49
|
+
}
|
|
50
|
+
return s;
|
|
51
|
+
}
|
|
52
|
+
/** Parse an identity/currency i-address; throws InvalidAddressError otherwise. */
|
|
53
|
+
function parseIAddress(s, label = 'address') {
|
|
54
|
+
const { version } = decode(s, label);
|
|
55
|
+
if (version !== index_js_1.I_ADDR_VERSION) {
|
|
56
|
+
throw new errors_js_1.InvalidAddressError(s, `${label} must be an identity i-address (version ${index_js_1.I_ADDR_VERSION}), got version ${version}`);
|
|
57
|
+
}
|
|
58
|
+
return s;
|
|
59
|
+
}
|
|
60
|
+
/** Parse any supported address into the discriminated union; throws otherwise. */
|
|
61
|
+
function parseAddress(s, label = 'address') {
|
|
62
|
+
const { version } = decode(s, label);
|
|
63
|
+
switch (version) {
|
|
64
|
+
case index_js_1.PUBKEY_HASH_PREFIX:
|
|
65
|
+
return s;
|
|
66
|
+
case index_js_1.I_ADDR_VERSION:
|
|
67
|
+
return s;
|
|
68
|
+
case P2SH_VERSION:
|
|
69
|
+
return s;
|
|
70
|
+
default:
|
|
71
|
+
throw new errors_js_1.InvalidAddressError(s, `${label} has unsupported version byte ${version}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Narrow an Address to an i-address by its version byte (replaces startsWith('i')). */
|
|
75
|
+
function isIAddress(a) {
|
|
76
|
+
return decode(a, 'address').version === index_js_1.I_ADDR_VERSION;
|
|
77
|
+
}
|
|
78
|
+
/** Narrow an Address to an R-address by its version byte. */
|
|
79
|
+
function isRAddress(a) {
|
|
80
|
+
return decode(a, 'address').version === index_js_1.PUBKEY_HASH_PREFIX;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=brands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../../src/core/brands.ts"],"names":[],"mappings":";;;;;AAwDA,sCAMC;AAGD,sCAMC;AAGD,oCAYC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ACrC,IAAI,OAAO,KAAK,yBAAc,EAAE,CAAC;QAC/B,MAAM,IAAI,+BAAmB,CAAC,CAAC,EAAE,GAAG,KAAK,2CAA2C,yBAAc,kBAAkB,OAAO,EAAE,CAAC,CAAC;IACjI,CAAC;IACD,OAAO,CAAa,CAAC;AACvB,CAAC;AAED,kFAAkF;AAClF,SAAgB,YAAY,CAAC,CAAS,EAAE,KAAK,GAAG,SAAS;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACrC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,6BAAkB;YACrB,OAAO,CAAa,CAAC;QACvB,KAAK,yBAAc;YACjB,OAAO,CAAa,CAAC;QACvB,KAAK,YAAY;YACf,OAAO,CAAgB,CAAC;QAC1B;YACE,MAAM,IAAI,+BAAmB,CAAC,CAAC,EAAE,GAAG,KAAK,iCAAiC,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;AACH,CAAC;AAED,wFAAwF;AACxF,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,KAAK,yBAAc,CAAC;AACzD,CAAC;AAED,6DAA6D;AAC7D,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,KAAK,6BAAkB,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQrD,OAAO,KAAK,EAAQ,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAI1F;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,OAAO,GACf,oBAAoB,CA6ItB"}
|
package/dist/currency/index.js
CHANGED
|
@@ -28,6 +28,7 @@ const index_js_2 = require("../signing/index.js");
|
|
|
28
28
|
const index_js_3 = require("../utxo/index.js");
|
|
29
29
|
const index_js_4 = require("../utils/index.js");
|
|
30
30
|
const index_js_5 = require("../identity/index.js");
|
|
31
|
+
const brands_js_1 = require("../core/brands.js");
|
|
31
32
|
const index_js_6 = require("../keys/index.js");
|
|
32
33
|
const errors_js_1 = require("../errors.js");
|
|
33
34
|
const { completeFundedIdentityUpdate } = utxo_lib_1.smarttxs;
|
|
@@ -74,6 +75,10 @@ function defineCurrency(params, network) {
|
|
|
74
75
|
// large; size the fee from their real byte length so the tx isn't estimated
|
|
75
76
|
// below the relay minimum.
|
|
76
77
|
const selection = (0, index_js_3.selectUtxos)(params.utxos, currencyDefValue, new Map(), 2, systemId, undefined, true, identityOutputScript.length + currencyDefScript.length);
|
|
78
|
+
// Currency definition pays only native and emits no token-change output, so a
|
|
79
|
+
// token-bearing funding UTXO would be silently dropped. Fail closed if one
|
|
80
|
+
// was selected (both maps empty ⇒ assert no token enters).
|
|
81
|
+
(0, index_js_3.assertTokenConservation)(selection.selected, new Map(), new Map(), systemId, 'currency definition');
|
|
77
82
|
// Build transaction
|
|
78
83
|
const txb = new utxo_lib_1.TransactionBuilder(verusNetwork);
|
|
79
84
|
txb.setVersion(4);
|
|
@@ -86,7 +91,7 @@ function defineCurrency(params, network) {
|
|
|
86
91
|
txb.addOutput(currencyDefScript, (0, index_js_4.toSafeNumber)(currencyDefValue));
|
|
87
92
|
if (selection.nativeChange > 0n) {
|
|
88
93
|
if (params.changeAddress.startsWith('i')) {
|
|
89
|
-
txb.addOutput((0, index_js_5.identityPaymentScript)(params.changeAddress), (0, index_js_4.toSafeNumber)(selection.nativeChange));
|
|
94
|
+
txb.addOutput((0, index_js_5.identityPaymentScript)((0, brands_js_1.parseIAddress)(params.changeAddress, 'changeAddress')), (0, index_js_4.toSafeNumber)(selection.nativeChange));
|
|
90
95
|
}
|
|
91
96
|
else {
|
|
92
97
|
txb.addOutput(params.changeAddress, (0, index_js_4.toSafeNumber)(selection.nativeChange));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AA2BH,wCAgJC;AAzKD,qCAAqC;AACrC,6CAAsE;AAA7D,+GAAA,gBAAgB,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAG9C,8CAA4E;AAC5E,6EAAuE;AACvE,kDAAuB;AACvB,oDAAuG;AAEvG,kDAAsH;AACtH,+CAAwE;AACxE,gDAAiD;AACjD,mDAAiF;AACjF,iDAAkD;AAClD,+CAA+C;AAC/C,4CAAsE;AAGtE,MAAM,EAAE,4BAA4B,EAAE,GAAG,mBAAQ,CAAC;AAElD;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,MAA4B,EAC5B,OAAgB;IAEhB,8EAA8E;IAC9E,mDAAmD;IACnD,MAAM,QAAQ,GAAG,IAAA,sBAAW,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ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,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE;QAC/C,KAAK,EAAE,MAAM,CAAC,WAAW;QACzB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;KAC1C,CACF,CAAC;IAEF,MAAM,QAAQ,GAAW,CAAC,GAAG,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzD,6EAA6E;IAC7E,qEAAqE;IACrE,IAAA,mCAAwB,EACtB,QAAQ,EACR,sBAAW,CAAC,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,IAAI,EACpD,SAAS,CAAC,GAAG,EACb,qBAAqB,CACtB,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,+BAAoB,EAC7C,YAAY,EACZ,MAAM,CAAC,GAAG,EACV,QAAQ,EACR,YAAY,CACb,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,IAAI;QACJ,GAAG,EAAE,SAAS,CAAC,GAAG;QAClB,eAAe,EAAE,QAAQ,CAAC,kBAAkB,EAAE;QAC9C,UAAU,EAAE,QAAQ,CAAC,MAAM;QAC3B,YAAY,EAAE,SAAS,CAAC,YAAY;KACrC,CAAC;AACJ,CAAC"}
|
package/dist/identity/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { Identity } from 'verus-typescript-primitives';
|
|
|
11
11
|
import { nameAndParentAddrToIAddr } from 'verus-typescript-primitives';
|
|
12
12
|
import type { Network } from '../constants/index.js';
|
|
13
13
|
import { type VerusNetwork } from '../signing/index.js';
|
|
14
|
+
import { type IAddress, type RAddress, type Address } from '../core/brands.js';
|
|
14
15
|
import type { CreateCommitmentParams, CreateCommitmentResult, RegisterIdentityParams, RegisterIdentityResult, UpdateIdentityParams, UpdateIdentityResult } from '../types/index.js';
|
|
15
16
|
export { nameAndParentAddrToIAddr };
|
|
16
17
|
/**
|
|
@@ -55,11 +56,11 @@ export declare function serializeCommitmentHash(hash: Buffer): Buffer;
|
|
|
55
56
|
/**
|
|
56
57
|
* Build the commitment output script
|
|
57
58
|
*/
|
|
58
|
-
export declare function buildCommitmentScript(commitmentHashBuf: Buffer, controlAddress:
|
|
59
|
+
export declare function buildCommitmentScript(commitmentHashBuf: Buffer, controlAddress: RAddress): Buffer;
|
|
59
60
|
/**
|
|
60
61
|
* Build the name reservation output script
|
|
61
62
|
*/
|
|
62
|
-
export declare function buildReservationScript(newIdentityIAddress:
|
|
63
|
+
export declare function buildReservationScript(newIdentityIAddress: IAddress, serializedReservation: Buffer, isAdvanced?: boolean): Buffer;
|
|
63
64
|
/**
|
|
64
65
|
* Build an identity definition output script from an Identity object
|
|
65
66
|
*/
|
|
@@ -75,7 +76,14 @@ export declare function isVRSCParent(parentIAddress: string | undefined, network
|
|
|
75
76
|
/**
|
|
76
77
|
* Build the full commitment data needed for Step 1 of identity creation
|
|
77
78
|
*/
|
|
78
|
-
export declare function prepareNameCommitment(name: string, controlAddress: string, referralIAddress?: string, parentIAddress?: string, network?: Network
|
|
79
|
+
export declare function prepareNameCommitment(name: string, controlAddress: string, referralIAddress?: string, parentIAddress?: string, network?: Network,
|
|
80
|
+
/**
|
|
81
|
+
* Explicit 32-byte salt. Omit for a fresh random salt (the normal path); pass
|
|
82
|
+
* a fixed value only to make the commitment deterministic for golden/diff
|
|
83
|
+
* tests. A reused salt on a real registration is a privacy leak, so callers
|
|
84
|
+
* outside tests must not set it.
|
|
85
|
+
*/
|
|
86
|
+
salt?: Buffer): {
|
|
79
87
|
salt: Buffer;
|
|
80
88
|
serializedReservation: Buffer;
|
|
81
89
|
commitmentHash: Buffer;
|
|
@@ -84,7 +92,14 @@ export declare function prepareNameCommitment(name: string, controlAddress: stri
|
|
|
84
92
|
identityAddress: string;
|
|
85
93
|
};
|
|
86
94
|
/**
|
|
87
|
-
* Build a
|
|
95
|
+
* Build a pay-to-identity output script for an i-address.
|
|
96
|
+
*
|
|
97
|
+
* Alias of {@link identityPaymentScript}. This previously emitted the bare
|
|
98
|
+
* 26-byte template `OP_DUP OP_HASH160 <idhash> OP_EQUALVERIFY OP_CHECKSIG
|
|
99
|
+
* OP_CHECKCRYPTOCONDITION`, which is NOT a valid Verus scriptPubKey — a Verus
|
|
100
|
+
* P2ID is a CryptoCondition (OptCCParams) output. Funds sent to the old
|
|
101
|
+
* template would have gone to a non-standard script the daemon does not treat
|
|
102
|
+
* as identity-spendable. It now delegates to the chain-verified CC builder.
|
|
88
103
|
*/
|
|
89
104
|
export declare function buildP2IDScript(iAddress: string): Buffer;
|
|
90
105
|
/**
|
|
@@ -93,11 +108,13 @@ export declare function buildP2IDScript(iAddress: string): Buffer;
|
|
|
93
108
|
* an identity (verified against on-chain P2ID outputs). Use this for change
|
|
94
109
|
* or payment outputs to an i-address.
|
|
95
110
|
*/
|
|
96
|
-
export declare function identityPaymentScript(iAddress:
|
|
111
|
+
export declare function identityPaymentScript(iAddress: IAddress): Buffer;
|
|
97
112
|
/**
|
|
98
|
-
* Build a CC referral payment output script
|
|
113
|
+
* Build a CC referral payment output script. Requires an already-parsed
|
|
114
|
+
* i-address: IdentityID.fromAddress launders the version byte, so accepting a
|
|
115
|
+
* raw string here is exactly the hole that let a wrong-kind address through.
|
|
99
116
|
*/
|
|
100
|
-
export declare function buildReferralPaymentScript(iAddress:
|
|
117
|
+
export declare function buildReferralPaymentScript(iAddress: IAddress): Buffer;
|
|
101
118
|
/**
|
|
102
119
|
* Calculate registration fee breakdown
|
|
103
120
|
*/
|
|
@@ -111,40 +128,40 @@ export declare function calculateRegistrationFees(hasReferral: boolean, totalFee
|
|
|
111
128
|
*/
|
|
112
129
|
export declare function createIdentityObject(params: {
|
|
113
130
|
name: string;
|
|
114
|
-
primaryAddresses:
|
|
131
|
+
primaryAddresses: RAddress[];
|
|
115
132
|
minSigs?: number;
|
|
116
|
-
revocationAuthority:
|
|
117
|
-
recoveryAuthority:
|
|
118
|
-
parentIAddress:
|
|
119
|
-
systemId:
|
|
133
|
+
revocationAuthority: IAddress;
|
|
134
|
+
recoveryAuthority: IAddress;
|
|
135
|
+
parentIAddress: IAddress;
|
|
136
|
+
systemId: IAddress;
|
|
120
137
|
}): Identity;
|
|
121
138
|
/**
|
|
122
139
|
* Build the parent-currency registration-fee output for a sub-ID.
|
|
123
140
|
*
|
|
124
|
-
* The
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
141
|
+
* The fee-output STRUCTURE depends on the parent currency's proofprotocol,
|
|
142
|
+
* verified against accepted on-chain registrations on VRSCTEST:
|
|
143
|
+
* - proofprotocol 2 (centralized / token, e.g. `ownora-nft`): a plain reserve
|
|
144
|
+
* output (EVAL_RESERVE_OUTPUT) holding `feeAmount` of the parent AT the
|
|
145
|
+
* parent's i-address, ZERO native.
|
|
146
|
+
* - otherwise (e.g. proofprotocol 1 PBaaS/fractional, `fum`): a CReserveTransfer
|
|
147
|
+
* (EVAL_RESERVE_TRANSFER) of `feeAmount` to the parent, carrying
|
|
148
|
+
* RESERVE_TRANSFER_FEE (0.0002) native.
|
|
131
149
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
150
|
+
* An offline SDK cannot read the parent's proofprotocol, so the caller passes it
|
|
151
|
+
* (`parentProofProtocol`). In both cases the native the transaction actually
|
|
152
|
+
* burns is the parent's idimportfees (`nativeImportFee`); the fee output's own
|
|
153
|
+
* native value is funded and cancels out in the conservation accounting.
|
|
136
154
|
*
|
|
137
|
-
* `
|
|
138
|
-
* are unused: the fee is denominated in and paid to the parent currency.
|
|
155
|
+
* `_controlAddress` is retained for signature compatibility and is unused.
|
|
139
156
|
*/
|
|
140
|
-
export declare function buildRegistrationFeeOutput(parentCurrencyId: string, feeAmount: bigint, systemId: string, _controlAddress: string): {
|
|
157
|
+
export declare function buildRegistrationFeeOutput(parentCurrencyId: string, feeAmount: bigint, systemId: string, _controlAddress: string, parentProofProtocol?: number): {
|
|
141
158
|
script: Buffer;
|
|
142
159
|
nativeValue: bigint;
|
|
143
160
|
};
|
|
144
161
|
/**
|
|
145
162
|
* Build a token change output (EVAL_RESERVE_OUTPUT)
|
|
146
163
|
*/
|
|
147
|
-
export declare function buildTokenChangeOutput(changeAddress:
|
|
164
|
+
export declare function buildTokenChangeOutput(changeAddress: Address, currencyChanges: Map<string, bigint>): {
|
|
148
165
|
script: Buffer;
|
|
149
166
|
nativeValue: bigint;
|
|
150
167
|
};
|
|
@@ -160,6 +177,7 @@ export declare function buildAndSignRegistration(params: RegisterIdentityParams,
|
|
|
160
177
|
* Build and sign an identity update transaction
|
|
161
178
|
*/
|
|
162
179
|
export declare function buildAndSignIdentityUpdate(params: UpdateIdentityParams, network: Network, operation?: 'update' | 'revoke' | 'recover' | 'lock' | 'unlock', lockUnlockParams?: {
|
|
163
|
-
|
|
180
|
+
unlockDelayBlocks?: number;
|
|
181
|
+
sanityOverride?: boolean;
|
|
164
182
|
}): UpdateIdentityResult;
|
|
165
183
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAQL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAQL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,wBAAwB,EAEzB,MAAM,6BAA6B,CAAC;AAYrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAmF,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzI,OAAO,EAAsE,KAAK,QAAQ,EAAE,K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