@xyo-network/wallet-model 6.0.9 → 6.1.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/README.md CHANGED
@@ -38,10 +38,12 @@ bun add {{name}}
38
38
 
39
39
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
40
 
41
+ ## Credits
41
42
 
43
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
42
44
 
43
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
44
45
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/wallet-model.svg
45
46
  [npm-link]: https://www.npmjs.com/package/@xyo-network/wallet-model
46
47
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/wallet-model.svg
47
48
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
49
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/wallet-model",
3
- "version": "6.0.9",
3
+ "version": "6.1.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,20 +34,17 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/account-model": "~6.0.9"
37
+ "@xyo-network/account-model": "~6.1.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@opentelemetry/api": "^1.9.1",
41
- "@opentelemetry/sdk-trace-base": "^2.7.1",
41
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
42
42
  "@scure/base": "~2.2.0",
43
- "@xylabs/sdk-js": "^6.0.8",
44
- "@xylabs/toolchain": "~8.1.16",
45
- "@xylabs/tsconfig": "~8.1.16",
43
+ "@xylabs/sdk-js": "^6.1.1",
44
+ "@xylabs/toolchain": "~8.1.20",
45
+ "@xylabs/tsconfig": "~8.1.20",
46
46
  "async-mutex": "^0.5.0",
47
- "bn.js": "^5.2.3",
48
- "buffer": "^6.0.3",
49
47
  "eslint": "^10.4.1",
50
- "ethers": "^6.16.0",
51
48
  "typescript": "~6.0.3",
52
49
  "zod": "^4.4.3"
53
50
  },
@@ -57,9 +54,6 @@
57
54
  "@scure/base": "~2.2",
58
55
  "@xylabs/sdk-js": "^6.0",
59
56
  "async-mutex": "^0.5",
60
- "bn.js": "^5.2",
61
- "buffer": "^6.0",
62
- "ethers": "^6.16",
63
57
  "zod": "^4.4"
64
58
  },
65
59
  "engines": {
@@ -1,27 +0,0 @@
1
- import type { WordlistInstance } from './Wordlist.ts';
2
- export interface MnemonicInstance {
3
- /**
4
- * The underlying entropy which the mnemonic encodes.
5
- */
6
- entropy: string;
7
- /**
8
- * The password used for this mnemonic. If no password is used this
9
- * is the empty string (i.e. ``""``) as per the specification.
10
- */
11
- password: string;
12
- /**
13
- * The mnemonic phrase of 12, 15, 18, 21 or 24 words.
14
- *
15
- * Use the [[wordlist]] ``split`` method to get the individual words.
16
- */
17
- phrase: string;
18
- /**
19
- * The wordlist for this mnemonic.
20
- */
21
- wordlist: WordlistInstance;
22
- /**
23
- * Returns the seed for the mnemonic.
24
- */
25
- computeSeed(): string;
26
- }
27
- //# sourceMappingURL=Mnemonic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mnemonic.d.ts","sourceRoot":"","sources":["../../src/Mnemonic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,WAAW,gBAAgB;IAE/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAA;IAE1B;;OAEG;IACH,WAAW,IAAI,MAAM,CAAA;CACtB"}
@@ -1,26 +0,0 @@
1
- import type { Hex } from '@xylabs/sdk-js';
2
- import type { AccountConfig, AccountInstance, AccountStatic } from '@xyo-network/account-model';
3
- import type { MnemonicInstance } from './Mnemonic.ts';
4
- export interface WalletInstance extends AccountInstance {
5
- readonly chainCode: string;
6
- readonly depth: number;
7
- readonly derivePath: (path: string) => Promise<WalletInstance>;
8
- readonly extendedKey: string;
9
- readonly fingerprint: string;
10
- readonly index: number;
11
- readonly mnemonic?: MnemonicInstance | null;
12
- readonly neuter: () => WalletInstance;
13
- readonly parentFingerprint: string;
14
- readonly path: string | null;
15
- readonly privateKey: Hex;
16
- readonly publicKey: Hex;
17
- }
18
- export interface WalletStatic<T extends WalletInstance = WalletInstance> extends Omit<AccountStatic<T>, 'create'> {
19
- create(config: AccountConfig): Promise<T>;
20
- fromExtendedKey(key: string): Promise<T>;
21
- fromMnemonic(mnemonic: MnemonicInstance): Promise<T>;
22
- fromPhrase(mnemonic: string, path?: string): Promise<T>;
23
- fromSeed(seed: string | ArrayBufferLike): Promise<T>;
24
- random(): any;
25
- }
26
- //# sourceMappingURL=Wallet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../src/Wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EACV,aAAa,EAAE,eAAe,EAAE,aAAa,EAC9C,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;IAC9D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,cAAc,CAAA;IACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAA;CACxB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC/G,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACzC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACxC,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACpD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAEpD,MAAM,IAAI,GAAG,CAAA;CACd"}
@@ -1,24 +0,0 @@
1
- export interface WordlistInstance {
2
- locale: string;
3
- /**
4
- * Maps an 11-bit value into its corresponding word in the list.
5
- *
6
- * Sub-classes MUST override this.
7
- */
8
- getWord(index: number): string;
9
- /**
10
- * Maps a word to its corresponding 11-bit value.
11
- *
12
- * Sub-classes MUST override this.
13
- */
14
- getWordIndex(word: string): number;
15
- /**
16
- * Sub-classes may override this to provider a language-specific
17
- * method for joining %%words%% into a phrase.
18
- *
19
- * By default, %%words%% are joined by a single space.
20
- */
21
- join(words: string[]): string;
22
- split(phrase: string): string[];
23
- }
24
- //# sourceMappingURL=Wordlist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Wordlist.d.ts","sourceRoot":"","sources":["../../src/Wordlist.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IAEd;;;;SAIK;IACL,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAE9B;;;;SAIK;IACL,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAElC;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAE7B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAEhC"}
@@ -1,2 +0,0 @@
1
- export * from './Wallet.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,27 +0,0 @@
1
- import type { WordlistInstance } from './Wordlist.ts';
2
- export interface MnemonicInstance {
3
- /**
4
- * The underlying entropy which the mnemonic encodes.
5
- */
6
- entropy: string;
7
- /**
8
- * The password used for this mnemonic. If no password is used this
9
- * is the empty string (i.e. ``""``) as per the specification.
10
- */
11
- password: string;
12
- /**
13
- * The mnemonic phrase of 12, 15, 18, 21 or 24 words.
14
- *
15
- * Use the [[wordlist]] ``split`` method to get the individual words.
16
- */
17
- phrase: string;
18
- /**
19
- * The wordlist for this mnemonic.
20
- */
21
- wordlist: WordlistInstance;
22
- /**
23
- * Returns the seed for the mnemonic.
24
- */
25
- computeSeed(): string;
26
- }
27
- //# sourceMappingURL=Mnemonic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mnemonic.d.ts","sourceRoot":"","sources":["../../src/Mnemonic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,WAAW,gBAAgB;IAE/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAA;IAE1B;;OAEG;IACH,WAAW,IAAI,MAAM,CAAA;CACtB"}
@@ -1,26 +0,0 @@
1
- import type { Hex } from '@xylabs/sdk-js';
2
- import type { AccountConfig, AccountInstance, AccountStatic } from '@xyo-network/account-model';
3
- import type { MnemonicInstance } from './Mnemonic.ts';
4
- export interface WalletInstance extends AccountInstance {
5
- readonly chainCode: string;
6
- readonly depth: number;
7
- readonly derivePath: (path: string) => Promise<WalletInstance>;
8
- readonly extendedKey: string;
9
- readonly fingerprint: string;
10
- readonly index: number;
11
- readonly mnemonic?: MnemonicInstance | null;
12
- readonly neuter: () => WalletInstance;
13
- readonly parentFingerprint: string;
14
- readonly path: string | null;
15
- readonly privateKey: Hex;
16
- readonly publicKey: Hex;
17
- }
18
- export interface WalletStatic<T extends WalletInstance = WalletInstance> extends Omit<AccountStatic<T>, 'create'> {
19
- create(config: AccountConfig): Promise<T>;
20
- fromExtendedKey(key: string): Promise<T>;
21
- fromMnemonic(mnemonic: MnemonicInstance): Promise<T>;
22
- fromPhrase(mnemonic: string, path?: string): Promise<T>;
23
- fromSeed(seed: string | ArrayBufferLike): Promise<T>;
24
- random(): any;
25
- }
26
- //# sourceMappingURL=Wallet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Wallet.d.ts","sourceRoot":"","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CAAA;IACpD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAEpD,MAAM,IAAI,GAAG,CAAA;CACd"}
@@ -1,24 +0,0 @@
1
- export interface WordlistInstance {
2
- locale: string;
3
- /**
4
- * Maps an 11-bit value into its corresponding word in the list.
5
- *
6
- * Sub-classes MUST override this.
7
- */
8
- getWord(index: number): string;
9
- /**
10
- * Maps a word to its corresponding 11-bit value.
11
- *
12
- * Sub-classes MUST override this.
13
- */
14
- getWordIndex(word: string): number;
15
- /**
16
- * Sub-classes may override this to provider a language-specific
17
- * method for joining %%words%% into a phrase.
18
- *
19
- * By default, %%words%% are joined by a single space.
20
- */
21
- join(words: string[]): string;
22
- split(phrase: string): string[];
23
- }
24
- //# sourceMappingURL=Wordlist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Wordlist.d.ts","sourceRoot":"","sources":["../../src/Wordlist.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IAEd;;;;SAIK;IACL,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAE9B;;;;SAIK;IACL,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAElC;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAE7B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAEhC"}
@@ -1,2 +0,0 @@
1
- export * from './Wallet.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }