@xyo-network/os-runtime 3.0.14 → 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/dist/neutral/Caller.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
|
+
import type { Promisable } from '@xylabs/promise';
|
|
2
3
|
import type { AccountInstance } from '@xyo-network/account';
|
|
3
4
|
import type { DappAccessRequest, DappId, DappInjectableParams, DappIntent, SigningKey, XyOsContext } from '@xyo-network/os-model';
|
|
4
5
|
import { DappIntentTypes, DappMode } from '@xyo-network/os-model';
|
|
@@ -17,7 +18,7 @@ export declare class DappCaller extends DappCallerBase {
|
|
|
17
18
|
getRegisteredDappAccessByName(name: string): Promise<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/os-model").RegisteredDappAccessFields & {
|
|
18
19
|
schema: "network.xyo.os.dapp.access.registered";
|
|
19
20
|
}>>;
|
|
20
|
-
getUserAccount(dappName: string
|
|
21
|
+
getUserAccount(dappName: string): Promisable<AccountInstance>;
|
|
21
22
|
getUserAccountsAll(): Promise<SigningKey[]>;
|
|
22
23
|
makeDappAccessRequest(requestingDappId: DappAccessRequest['requestingDappId'], registeredDappAccessHash: DappAccessRequest['registeredDappAccessHash'], mode?: DappAccessRequest['mode'], destinationArchivist?: DappAccessRequest['destinationArchivist']): Promise<void>;
|
|
23
24
|
makeDappIntentRequest(sourceDappId: DappId, targetDappId: DappId, intent?: DappIntentTypes, mode?: DappMode, params?: DappIntent['params']): Promise<WithMeta<WithMeta<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Caller.d.ts","sourceRoot":"","sources":["../../src/Caller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,C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E,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIpD,qBAAa,UAAW,SAAQ,cAAc;gBAChC,OAAO,EAAE,WAAW;IAS1B,0BAA0B,CAAC,QAAQ,GAAE,OAAO,EAAO,EAAE,KAAK,GAAE,OAAe;IAqBjF,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,wBAAwB,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM;;;IAerI,qBAAqB;;;IAerB,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAUtE,6BAA6B,CAAC,IAAI,EAAE,MAAM;;;IAgBhD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,eAAe,CAAC;IAcvD,kBAAkB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAsB3C,qBAAqB,CACzB,gBAAgB,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,EACvD,wBAAwB,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,EACvE,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAChC,oBAAoB,CAAC,EAAE,iBAAiB,CAAC,sBAAsB,CAAC;IAkB5D,qBAAqB,CACzB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE,eAAwC,EAChD,IAAI,GAAE,QAA0B,EAChC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;;;IAgBzB,4BAA4B,CAAC,YAAY,EAAE,eAAe,YAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAkB3H"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -524,7 +524,6 @@ import { PayloadBuilder as PayloadBuilder3 } from "@xyo-network/payload-builder"
|
|
|
524
524
|
|
|
525
525
|
// src/Caller.ts
|
|
526
526
|
import { assertEx as assertEx8 } from "@xylabs/assert";
|
|
527
|
-
import { Account } from "@xyo-network/account";
|
|
528
527
|
import { PayloadDivinerQuerySchema as PayloadDivinerQuerySchema4 } from "@xyo-network/diviner-payload-model";
|
|
529
528
|
import {
|
|
530
529
|
DappAccessRequestSchema as DappAccessRequestSchema2,
|
|
@@ -723,25 +722,9 @@ var DappCaller = class extends DappCallerBase {
|
|
|
723
722
|
/**
|
|
724
723
|
* Get the user wallet
|
|
725
724
|
*/
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
const query = {
|
|
729
|
-
dappName,
|
|
730
|
-
limit: 1,
|
|
731
|
-
order: "desc",
|
|
732
|
-
schema: PayloadDivinerQuerySchema4,
|
|
733
|
-
schemas: [SigningKeySchema]
|
|
734
|
-
};
|
|
735
|
-
const [payload] = assertEx8(await diviner.divine([query]), () => "Unable to find user wallet");
|
|
736
|
-
if (payload) {
|
|
737
|
-
console.log("*** old implementation address", await Account.fromPrivateKey(payload.privateKey));
|
|
738
|
-
if (!useSigners) return await Account.fromPrivateKey(payload.privateKey);
|
|
739
|
-
} else {
|
|
740
|
-
throw new Error("Unable to find user wallet");
|
|
741
|
-
}
|
|
742
|
-
const account = this.context.user.signers?.get("Name Service");
|
|
725
|
+
getUserAccount(dappName) {
|
|
726
|
+
const account = this.context.user.signers?.get(dappName);
|
|
743
727
|
if (account) {
|
|
744
|
-
console.log("*** new implementation address", account);
|
|
745
728
|
return account;
|
|
746
729
|
} else {
|
|
747
730
|
throw new Error("Unable to find user wallet");
|