@swapkit/helpers 6.1.1 → 6.2.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.
@@ -477,6 +477,22 @@ declare const errorCodes: {
477
477
  readonly toolbox_aleo_no_unspent_records: 91211;
478
478
  readonly toolbox_aleo_conflicting_signers: 91212;
479
479
  readonly toolbox_aleo_no_rpc_urls: 91213;
480
+ /**
481
+ * Toolboxes - Lightspark
482
+ */
483
+ readonly toolbox_lightspark_missing_credentials: 91301;
484
+ readonly toolbox_lightspark_invalid_invoice: 91302;
485
+ readonly toolbox_lightspark_invoice_amount_mismatch: 91303;
486
+ readonly toolbox_lightspark_invoice_destination_mismatch: 91304;
487
+ readonly toolbox_lightspark_invoice_expired: 91305;
488
+ readonly toolbox_lightspark_invoice_already_settled: 91306;
489
+ readonly toolbox_lightspark_fee_limit_exceeded: 91307;
490
+ readonly toolbox_lightspark_invalid_params: 91308;
491
+ readonly toolbox_lightspark_api_error: 91309;
492
+ readonly toolbox_lightspark_invalid_amount: 91310;
493
+ readonly toolbox_lightspark_invalid_destination: 91311;
494
+ readonly toolbox_lightspark_network_mismatch: 91312;
495
+ readonly toolbox_lightspark_signing_key_unavailable: 91313;
480
496
  /**
481
497
  * Toolboxes - General
482
498
  */
@@ -1020,6 +1036,22 @@ export declare class SwapKitError extends Error {
1020
1036
  readonly toolbox_aleo_no_unspent_records: 91211;
1021
1037
  readonly toolbox_aleo_conflicting_signers: 91212;
1022
1038
  readonly toolbox_aleo_no_rpc_urls: 91213;
1039
+ /**
1040
+ * Toolboxes - Lightspark
1041
+ */
1042
+ readonly toolbox_lightspark_missing_credentials: 91301;
1043
+ readonly toolbox_lightspark_invalid_invoice: 91302;
1044
+ readonly toolbox_lightspark_invoice_amount_mismatch: 91303;
1045
+ readonly toolbox_lightspark_invoice_destination_mismatch: 91304;
1046
+ readonly toolbox_lightspark_invoice_expired: 91305;
1047
+ readonly toolbox_lightspark_invoice_already_settled: 91306;
1048
+ readonly toolbox_lightspark_fee_limit_exceeded: 91307;
1049
+ readonly toolbox_lightspark_invalid_params: 91308;
1050
+ readonly toolbox_lightspark_api_error: 91309;
1051
+ readonly toolbox_lightspark_invalid_amount: 91310;
1052
+ readonly toolbox_lightspark_invalid_destination: 91311;
1053
+ readonly toolbox_lightspark_network_mismatch: 91312;
1054
+ readonly toolbox_lightspark_signing_key_unavailable: 91313;
1023
1055
  /**
1024
1056
  * Toolboxes - General
1025
1057
  */
@@ -10,4 +10,4 @@ export type DerivationPathArray = ReturnType<typeof getChainConfig>["networkDeri
10
10
  * tuples also freezes `getChainConfig(chain).networkDerivationPath` in `@swapkit/types`, which is
11
11
  * intentional: nothing may rewrite a chain's derivation path at runtime.
12
12
  */
13
- export declare const NetworkDerivationPath: Readonly<Record<Chain, readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0]>>;
13
+ export declare const NetworkDerivationPath: Readonly<Record<Chain, readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0]>>;
@@ -126,7 +126,7 @@ export declare const ACCOUNT_INDEXED_CHAINS: readonly Chain[];
126
126
  * index. Multi-chain connectors can isolate that rejection while connecting supported siblings.
127
127
  */
128
128
  export declare const SINGLE_WALLET_CHAINS: readonly Chain[];
129
- export declare function resolveDerivationPath({ chain, derivationPath, index }: ResolveDerivationPathParams): readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0];
129
+ export declare function resolveDerivationPath({ chain, derivationPath, index }: ResolveDerivationPathParams): readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0];
130
130
  export declare function derivationPathToString([network, chainId, account, change, index]: DerivationPathLike, { allHardened }?: {
131
131
  allHardened?: boolean;
132
132
  }): string;
@@ -147,7 +147,7 @@ export declare function derivationPathToString([network, chainId, account, chang
147
147
  * whatever path the chain declares. That is long-standing behaviour and callers rely on nothing
148
148
  * throwing here.
149
149
  */
150
- export declare function getDerivationPathFor({ chain, index, addressIndex, type }: Params): readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0] | number[];
150
+ export declare function getDerivationPathFor({ chain, index, addressIndex, type }: Params): readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0] | number[];
151
151
  export declare function getWalletFormatFor(path: string): "legacy" | "p2sh" | "bech32";
152
152
  export declare const DerivationPath: Readonly<Record<Chain, string>>;
153
153
  export {};
package/package.json CHANGED
@@ -3,11 +3,11 @@
3
3
  "dependencies": {
4
4
  "@noble/hashes": "2.2.0",
5
5
  "@swapkit/contracts": "5.0.0",
6
- "@swapkit/tokens": "5.0.13",
7
- "@swapkit/types": "2.0.0"
6
+ "@swapkit/tokens": "5.0.15",
7
+ "@swapkit/types": "2.1.0"
8
8
  },
9
9
  "description": "SwapKit - Helpers",
10
- "devDependencies": { "@swapkit/toolboxes": "6.2.0" },
10
+ "devDependencies": { "@swapkit/toolboxes": "6.4.0" },
11
11
  "exports": {
12
12
  ".": { "default": "./dist/index.js", "types": "./dist/types/index.d.ts" },
13
13
  "./api": { "default": "./dist/api/index.js", "types": "./dist/types/api/index.d.ts" },
@@ -30,5 +30,5 @@
30
30
  "type-check:go": "tsgo"
31
31
  },
32
32
  "type": "module",
33
- "version": "6.1.1"
33
+ "version": "6.2.0"
34
34
  }