@xyo-network/wallet-model 7.0.5 → 7.0.6
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 +1 -47
- package/dist/neutral/index.d.ts +5 -1
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -0
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +19 -13
- package/dist/neutral/Mnemonic.d.ts +0 -27
- package/dist/neutral/Mnemonic.d.ts.map +0 -1
- package/dist/neutral/Wallet.d.ts +0 -26
- package/dist/neutral/Wallet.d.ts.map +0 -1
- package/dist/neutral/Wordlist.d.ts +0 -24
- package/dist/neutral/Wordlist.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
[![logo][]](https://xyo.network)
|
|
2
|
-
|
|
3
1
|
# @xyo-network/wallet-model
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
[![license][license-badge]][license-link]
|
|
7
|
-
|
|
8
|
-
> Primary SDK for using XYO Protocol 2.0
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
Using npm:
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
npm install {{name}}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Using yarn:
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
yarn add {{name}}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Using pnpm:
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
pnpm add {{name}}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Using bun:
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
bun add {{name}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
|
-
|
|
41
|
-
## Credits
|
|
42
|
-
|
|
43
|
-
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
44
|
-
|
|
45
|
-
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/wallet-model.svg
|
|
46
|
-
[npm-link]: https://www.npmjs.com/package/@xyo-network/wallet-model
|
|
47
|
-
[license-badge]: https://img.shields.io/npm/l/@xyo-network/wallet-model.svg
|
|
48
|
-
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
|
49
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
3
|
+
Deprecated compatibility stub. Use `@xyo-network/sdk-protocol/wallet-model` instead.
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@xyo-network/sdk-protocol/wallet-model` instead.
|
|
3
|
+
* `@xyo-network/wallet-model` is a backward-compatibility re-export stub.
|
|
4
|
+
*/
|
|
5
|
+
export * from '@xyo-network/sdk-protocol/wallet-model';
|
|
2
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,wCAAwC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @deprecated Use `@xyo-network/sdk-protocol/wallet-model` instead.\n * `@xyo-network/wallet-model` is a backward-compatibility re-export stub.\n */\nexport * from '@xyo-network/sdk-protocol/wallet-model'\n"],
|
|
5
|
+
"mappings": ";AAIA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/wallet-model",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.6",
|
|
4
|
+
"description": "DEPRECATED - use @xyo-network/sdk-protocol/wallet-model. Backward-compatibility re-export stub for @xyo-network/wallet-model.",
|
|
5
|
+
"deprecated": "Use @xyo-network/sdk-protocol/wallet-model instead. @xyo-network/wallet-model is a backward-compatibility re-export stub and will not receive further updates.",
|
|
5
6
|
"homepage": "https://xyo.network",
|
|
6
7
|
"bugs": {
|
|
7
8
|
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
|
|
@@ -34,28 +35,33 @@
|
|
|
34
35
|
"README.md"
|
|
35
36
|
],
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
+
"@xyo-network/sdk-protocol": "~7.0.6"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@scure/base": "~2.2.0",
|
|
43
|
-
"@xylabs/sdk": "^7.0.1",
|
|
44
|
-
"@xylabs/toolchain": "~8.5.3",
|
|
45
|
-
"@xylabs/tsconfig": "~8.5.3",
|
|
46
|
-
"async-mutex": "^0.5.0",
|
|
41
|
+
"@xylabs/toolchain": "~8.5.12",
|
|
42
|
+
"@xylabs/tsconfig": "~8.5.12",
|
|
47
43
|
"browserslist": "4.28.4",
|
|
48
44
|
"eslint": "^10.6.0",
|
|
49
45
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
50
|
-
"typescript": "~6.0.3"
|
|
51
|
-
"zod": "^4.4.3"
|
|
46
|
+
"typescript": "~6.0.3"
|
|
52
47
|
},
|
|
53
48
|
"peerDependencies": {
|
|
49
|
+
"@ariestools/sdk": "^7.0.4",
|
|
50
|
+
"@bitauth/libauth": "~3.0",
|
|
51
|
+
"@noble/post-quantum": "~0.6.1",
|
|
54
52
|
"@opentelemetry/api": "^1.9",
|
|
55
53
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
56
54
|
"@scure/base": "~2.2",
|
|
57
|
-
"@
|
|
55
|
+
"@scure/bip39": "~2.2",
|
|
56
|
+
"@xylabs/geo": "^7.0",
|
|
57
|
+
"@xylabs/threads": "^7.0",
|
|
58
|
+
"ajv": "^8.20",
|
|
58
59
|
"async-mutex": "^0.5",
|
|
60
|
+
"debug": "^4.4",
|
|
61
|
+
"ethers": "^6.16",
|
|
62
|
+
"hash-wasm": "~4.12",
|
|
63
|
+
"idb": "^8.0",
|
|
64
|
+
"observable-fns": "^0.6",
|
|
59
65
|
"zod": "^4.4"
|
|
60
66
|
},
|
|
61
67
|
"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"}
|
package/dist/neutral/Wallet.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Hex } from '@xylabs/sdk';
|
|
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,aAAa,CAAA;AACtC,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"}
|