@lumenwipe/verify 0.3.0 → 0.5.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/CHANGELOG.md +58 -1
- package/README.md +14 -5
- package/dist/index.cjs +237 -84
- package/dist/index.d.cts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +237 -84
- package/package.json +1 -1
- package/vectors/close-v1.json +373 -0
package/dist/index.d.cts
CHANGED
|
@@ -325,6 +325,8 @@ export declare interface ExchangeRegistryEntry {
|
|
|
325
325
|
requiresMemo: boolean;
|
|
326
326
|
/** The required memo type, if `requiresMemo` is true. */
|
|
327
327
|
memoType: "text" | "id" | "hash";
|
|
328
|
+
/** Present only on an entry scoped to testnet. Absent means the entry applies on every network. */
|
|
329
|
+
network?: "testnet";
|
|
328
330
|
}
|
|
329
331
|
|
|
330
332
|
/**
|
|
@@ -412,6 +414,9 @@ declare interface PhoenixStakePosition extends DefiPositionBase {
|
|
|
412
414
|
stakedAmount: string;
|
|
413
415
|
/** Unix seconds; unbonding requires the original stake's timestamp (architecture.md §9.6). */
|
|
414
416
|
stakedAtEpoch: string;
|
|
417
|
+
/** The pool's LP share token (`CONFIG.share_token`): unbonding returns the shares to it, and the
|
|
418
|
+
* withdrawal that follows transfers them back to the pool. Read from the pool. */
|
|
419
|
+
shareToken?: string;
|
|
415
420
|
}
|
|
416
421
|
|
|
417
422
|
declare interface PlanBlocker {
|
|
@@ -427,13 +432,14 @@ declare interface PoolShareEntry {
|
|
|
427
432
|
}
|
|
428
433
|
|
|
429
434
|
/**
|
|
430
|
-
* Whether a close to `address` goes through the shared intermediary: true only for
|
|
431
|
-
* the registry bundled in this package lists as unable to receive
|
|
432
|
-
*
|
|
435
|
+
* Whether a close to `address` on `network` goes through the shared intermediary: true only for
|
|
436
|
+
* an exchange the registry bundled in this package lists, on that network, as unable to receive
|
|
437
|
+
* an account merge. An entry scoped to testnet never answers true on mainnet. The same rule
|
|
438
|
+
* `verifyCloseTransaction` applies, so an integrator decides from it, never from the API's
|
|
433
439
|
* response, whether a transaction needs the intermediary's co-signature. A served snapshot never
|
|
434
440
|
* changes this answer, so it takes none.
|
|
435
441
|
*/
|
|
436
|
-
export declare function requiresMediator(address: string): boolean;
|
|
442
|
+
export declare function requiresMediator(address: string, network: Network): boolean;
|
|
437
443
|
|
|
438
444
|
/**
|
|
439
445
|
* Every reason the revocation anchor refuses a transaction, one stable code each, in the order the
|
|
@@ -483,6 +489,9 @@ export declare type RevokeAllowanceVerificationErrorCode = (typeof REVOKE_ALLOWA
|
|
|
483
489
|
* - It never enables the mediated hand-off. That stays limited to the exchanges the bundled
|
|
484
490
|
* registry lists ({@link requiresMediator}), so an address only the snapshot lists as needing
|
|
485
491
|
* the intermediary refuses both shapes until this package is updated.
|
|
492
|
+
* - It never changes the network a bundled exchange applies on: a testnet-only entry stays
|
|
493
|
+
* unlisted on mainnet, and an entry listed on every network stays listed on both. An entry it
|
|
494
|
+
* adds with `network: "testnet"` applies on testnet only; any other `network` value drops it.
|
|
486
495
|
* - Its `validUntil` may move the bundled expiry later, by at most 120 days, never earlier.
|
|
487
496
|
* - It never decides a memo type. A different type for a bundled exchange is refused with
|
|
488
497
|
* `registry_memo_type_conflict`, and a type for an address it adds that differs from the one
|
package/dist/index.d.ts
CHANGED
|
@@ -325,6 +325,8 @@ export declare interface ExchangeRegistryEntry {
|
|
|
325
325
|
requiresMemo: boolean;
|
|
326
326
|
/** The required memo type, if `requiresMemo` is true. */
|
|
327
327
|
memoType: "text" | "id" | "hash";
|
|
328
|
+
/** Present only on an entry scoped to testnet. Absent means the entry applies on every network. */
|
|
329
|
+
network?: "testnet";
|
|
328
330
|
}
|
|
329
331
|
|
|
330
332
|
/**
|
|
@@ -412,6 +414,9 @@ declare interface PhoenixStakePosition extends DefiPositionBase {
|
|
|
412
414
|
stakedAmount: string;
|
|
413
415
|
/** Unix seconds; unbonding requires the original stake's timestamp (architecture.md §9.6). */
|
|
414
416
|
stakedAtEpoch: string;
|
|
417
|
+
/** The pool's LP share token (`CONFIG.share_token`): unbonding returns the shares to it, and the
|
|
418
|
+
* withdrawal that follows transfers them back to the pool. Read from the pool. */
|
|
419
|
+
shareToken?: string;
|
|
415
420
|
}
|
|
416
421
|
|
|
417
422
|
declare interface PlanBlocker {
|
|
@@ -427,13 +432,14 @@ declare interface PoolShareEntry {
|
|
|
427
432
|
}
|
|
428
433
|
|
|
429
434
|
/**
|
|
430
|
-
* Whether a close to `address` goes through the shared intermediary: true only for
|
|
431
|
-
* the registry bundled in this package lists as unable to receive
|
|
432
|
-
*
|
|
435
|
+
* Whether a close to `address` on `network` goes through the shared intermediary: true only for
|
|
436
|
+
* an exchange the registry bundled in this package lists, on that network, as unable to receive
|
|
437
|
+
* an account merge. An entry scoped to testnet never answers true on mainnet. The same rule
|
|
438
|
+
* `verifyCloseTransaction` applies, so an integrator decides from it, never from the API's
|
|
433
439
|
* response, whether a transaction needs the intermediary's co-signature. A served snapshot never
|
|
434
440
|
* changes this answer, so it takes none.
|
|
435
441
|
*/
|
|
436
|
-
export declare function requiresMediator(address: string): boolean;
|
|
442
|
+
export declare function requiresMediator(address: string, network: Network): boolean;
|
|
437
443
|
|
|
438
444
|
/**
|
|
439
445
|
* Every reason the revocation anchor refuses a transaction, one stable code each, in the order the
|
|
@@ -483,6 +489,9 @@ export declare type RevokeAllowanceVerificationErrorCode = (typeof REVOKE_ALLOWA
|
|
|
483
489
|
* - It never enables the mediated hand-off. That stays limited to the exchanges the bundled
|
|
484
490
|
* registry lists ({@link requiresMediator}), so an address only the snapshot lists as needing
|
|
485
491
|
* the intermediary refuses both shapes until this package is updated.
|
|
492
|
+
* - It never changes the network a bundled exchange applies on: a testnet-only entry stays
|
|
493
|
+
* unlisted on mainnet, and an entry listed on every network stays listed on both. An entry it
|
|
494
|
+
* adds with `network: "testnet"` applies on testnet only; any other `network` value drops it.
|
|
486
495
|
* - Its `validUntil` may move the bundled expiry later, by at most 120 days, never earlier.
|
|
487
496
|
* - It never decides a memo type. A different type for a bundled exchange is refused with
|
|
488
497
|
* `registry_memo_type_conflict`, and a type for an address it adds that differs from the one
|