@xyo-network/os-runtime 3.0.13 → 3.0.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/os-runtime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@xyo-network/archivist": "^3.0.7",
|
|
40
40
|
"@xyo-network/archivist-indexeddb": "^3.0.7",
|
|
41
41
|
"@xyo-network/archivist-model": "^3.0.7",
|
|
42
|
-
"@xyo-network/bios": "^3.0.
|
|
43
|
-
"@xyo-network/bios-model": "^3.0.
|
|
42
|
+
"@xyo-network/bios": "^3.0.15",
|
|
43
|
+
"@xyo-network/bios-model": "^3.0.15",
|
|
44
44
|
"@xyo-network/bridge-model": "^3.0.7",
|
|
45
45
|
"@xyo-network/diviner-abstract": "^3.0.7",
|
|
46
46
|
"@xyo-network/diviner-model": "^3.0.7",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@xyo-network/diviner-payload-indexeddb": "^3.0.7",
|
|
49
49
|
"@xyo-network/diviner-payload-model": "^3.0.7",
|
|
50
50
|
"@xyo-network/diviner-temporal-indexing-model": "^3.0.7",
|
|
51
|
-
"@xyo-network/kernel": "^3.0.
|
|
52
|
-
"@xyo-network/kernel-model": "^3.0.
|
|
51
|
+
"@xyo-network/kernel": "^3.0.15",
|
|
52
|
+
"@xyo-network/kernel-model": "^3.0.15",
|
|
53
53
|
"@xyo-network/manifest": "^3.0.7",
|
|
54
54
|
"@xyo-network/manifest-wrapper": "^3.0.7",
|
|
55
55
|
"@xyo-network/module-abstract": "^3.0.7",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@xyo-network/module-model": "^3.0.7",
|
|
59
59
|
"@xyo-network/module-resolver": "^3.0.7",
|
|
60
60
|
"@xyo-network/node-model": "^3.0.7",
|
|
61
|
-
"@xyo-network/os-model": "^3.0.
|
|
61
|
+
"@xyo-network/os-model": "^3.0.15",
|
|
62
62
|
"@xyo-network/payload-builder": "^3.0.7",
|
|
63
63
|
"@xyo-network/payload-model": "^3.0.7",
|
|
64
64
|
"@xyo-network/wallet-model": "^3.0.7",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/uuid": "^10.0.0",
|
|
73
73
|
"@xylabs/ts-scripts-yarn3": "^4.0.1",
|
|
74
74
|
"@xylabs/tsconfig": "^4.0.1",
|
|
75
|
-
"@xyo-network/bios-nodejs": "^3.0.
|
|
75
|
+
"@xyo-network/bios-nodejs": "^3.0.15",
|
|
76
76
|
"typescript": "^5.5.4",
|
|
77
77
|
"vitest": "^2.0.5"
|
|
78
78
|
},
|
package/src/Caller.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import type { Hash } from '@xylabs/hex'
|
|
3
|
+
import type { Promisable } from '@xylabs/promise'
|
|
3
4
|
import type { AccountInstance } from '@xyo-network/account'
|
|
4
5
|
import { Account } from '@xyo-network/account'
|
|
5
6
|
import type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'
|
|
@@ -116,29 +117,11 @@ export class DappCaller extends DappCallerBase {
|
|
|
116
117
|
/**
|
|
117
118
|
* Get the user wallet
|
|
118
119
|
*/
|
|
119
|
-
|
|
120
|
-
// old implementation
|
|
121
|
-
const diviner = await this.getDappArchivistPayloadDiviner()
|
|
122
|
-
const query: PayloadDivinerQueryPayload<SigningKeyFields> = {
|
|
123
|
-
dappName,
|
|
124
|
-
limit: 1,
|
|
125
|
-
order: 'desc',
|
|
126
|
-
schema: PayloadDivinerQuerySchema,
|
|
127
|
-
schemas: [SigningKeySchema],
|
|
128
|
-
}
|
|
129
|
-
const [payload] = assertEx(await diviner.divine([query]), () => 'Unable to find user wallet') as WithMeta<SigningKey>[]
|
|
130
|
-
if (payload) {
|
|
131
|
-
console.log('*** old implementation address', await Account.fromPrivateKey(payload.privateKey))
|
|
132
|
-
if (!useSigners) return await Account.fromPrivateKey(payload.privateKey)
|
|
133
|
-
} else {
|
|
134
|
-
throw new Error('Unable to find user wallet')
|
|
135
|
-
}
|
|
136
|
-
|
|
120
|
+
getUserAccount(dappName: string): Promisable<AccountInstance> {
|
|
137
121
|
// new implementation
|
|
138
|
-
const account = this.context.user.signers?.get(
|
|
122
|
+
const account = this.context.user.signers?.get(dappName)
|
|
139
123
|
|
|
140
124
|
if (account) {
|
|
141
|
-
console.log('*** new implementation address', account)
|
|
142
125
|
return account
|
|
143
126
|
} else {
|
|
144
127
|
throw new Error('Unable to find user wallet')
|