@xyo-network/bridge-wrapper 2.91.2 → 2.92.0-rc.2
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/browser/BridgeWrapper.d.cts +4 -60
- package/dist/browser/BridgeWrapper.d.cts.map +1 -1
- package/dist/browser/BridgeWrapper.d.mts +4 -60
- package/dist/browser/BridgeWrapper.d.mts.map +1 -1
- package/dist/browser/BridgeWrapper.d.ts +4 -60
- package/dist/browser/BridgeWrapper.d.ts.map +1 -1
- package/dist/browser/index.cjs +21 -62
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +22 -63
- package/dist/browser/index.js.map +1 -1
- package/dist/node/BridgeWrapper.d.cts +4 -60
- package/dist/node/BridgeWrapper.d.cts.map +1 -1
- package/dist/node/BridgeWrapper.d.mts +4 -60
- package/dist/node/BridgeWrapper.d.mts.map +1 -1
- package/dist/node/BridgeWrapper.d.ts +4 -60
- package/dist/node/BridgeWrapper.d.ts.map +1 -1
- package/dist/node/index.cjs +20 -61
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +22 -63
- package/dist/node/index.js.map +1 -1
- package/package.json +7 -10
- package/src/BridgeWrapper.ts +20 -89
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -26,12 +26,8 @@ __export(src_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(src_exports);
|
|
27
27
|
|
|
28
28
|
// src/BridgeWrapper.ts
|
|
29
|
-
var import_assert = require("@xylabs/assert");
|
|
30
29
|
var import_bridge_model = require("@xyo-network/bridge-model");
|
|
31
|
-
var import_manifest_model = require("@xyo-network/manifest-model");
|
|
32
|
-
var import_module_model = require("@xyo-network/module-model");
|
|
33
30
|
var import_module_wrapper = require("@xyo-network/module-wrapper");
|
|
34
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
|
35
31
|
(0, import_module_wrapper.constructableModuleWrapper)();
|
|
36
32
|
var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
|
|
37
33
|
static {
|
|
@@ -39,66 +35,29 @@ var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
|
|
|
39
35
|
}
|
|
40
36
|
static instanceIdentityCheck = import_bridge_model.isBridgeInstance;
|
|
41
37
|
static moduleIdentityCheck = import_bridge_model.isBridgeModule;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
async connect(uri) {
|
|
49
|
-
const queryPayload = {
|
|
50
|
-
schema: import_bridge_model.BridgeConnectQuerySchema,
|
|
51
|
-
uri
|
|
52
|
-
};
|
|
53
|
-
await this.sendQuery(queryPayload);
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
async disconnect(uri) {
|
|
57
|
-
const queryPayload = {
|
|
58
|
-
schema: import_bridge_model.BridgeDisconnectQuerySchema,
|
|
59
|
-
uri
|
|
60
|
-
};
|
|
61
|
-
await this.sendQuery(queryPayload);
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
getRootAddress() {
|
|
65
|
-
throw new Error("Method not implemented.");
|
|
66
|
-
}
|
|
67
|
-
targetConfig(address) {
|
|
68
|
-
return this.module.targetConfig(address);
|
|
69
|
-
}
|
|
70
|
-
async targetDiscover(address) {
|
|
71
|
-
const queryPayload = {
|
|
72
|
-
schema: import_module_model.ModuleDiscoverQuerySchema
|
|
38
|
+
async expose(id, options) {
|
|
39
|
+
const filterPayload = {
|
|
40
|
+
id,
|
|
41
|
+
schema: import_bridge_model.ModuleFilterPayloadSchema,
|
|
42
|
+
...options
|
|
73
43
|
};
|
|
74
|
-
return await this.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
44
|
+
return (await this.sendQuery({
|
|
45
|
+
schema: import_bridge_model.BridgeExposeQuerySchema
|
|
46
|
+
}, [
|
|
47
|
+
filterPayload
|
|
48
|
+
])).map(({ address }) => address);
|
|
49
|
+
}
|
|
50
|
+
async unexpose(id, options) {
|
|
51
|
+
const filterPayload = {
|
|
52
|
+
id,
|
|
53
|
+
schema: import_bridge_model.ModuleFilterPayloadSchema,
|
|
54
|
+
...options
|
|
80
55
|
};
|
|
81
|
-
return (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
async targetQuery(address, query, payloads) {
|
|
87
|
-
return await this.module.targetQuery(address, query, payloads);
|
|
88
|
-
}
|
|
89
|
-
async targetQueryable(address, query, payloads, queryConfig) {
|
|
90
|
-
return await this.module.targetQueryable(address, query, payloads, queryConfig);
|
|
91
|
-
}
|
|
92
|
-
async targetResolve(address, nameOrAddressOrFilter, options) {
|
|
93
|
-
return await this.module.targetResolve(address, nameOrAddressOrFilter, options);
|
|
94
|
-
}
|
|
95
|
-
async sendTargetQuery(address, queryPayload, payloads) {
|
|
96
|
-
const query = await this.bindQuery(queryPayload, payloads);
|
|
97
|
-
const [, resultPayloads, errors] = await this.module.targetQuery(address, query[0], query[1]);
|
|
98
|
-
if (errors?.length > 0) {
|
|
99
|
-
throw errors[0];
|
|
100
|
-
}
|
|
101
|
-
return resultPayloads;
|
|
56
|
+
return (await this.sendQuery({
|
|
57
|
+
schema: import_bridge_model.BridgeUnexposeQuerySchema
|
|
58
|
+
}, [
|
|
59
|
+
filterPayload
|
|
60
|
+
])).map(({ address }) => address);
|
|
102
61
|
}
|
|
103
62
|
};
|
|
104
63
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper'\n","import {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper'\n","import { Address } from '@xylabs/hex'\nimport { AddressPayload } from '@xyo-network/address-payload-plugin'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']>\n{\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(\n ({ address }) => address,\n )\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACEA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,gBAAN,cACGC,oCAAAA;EAnBV,OAmBUA;;;EAGR,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAAmD;AACpF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YAAQ,MAAM,KAAKI,UAAkE;MAAEF,QAAQG;IAAwB,GAAG;MAACJ;KAAc,GAAGK,IAC1I,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EAErB;EAEA,MAAMC,SAAST,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKI,UAAoE;MAAEF,QAAQO;IAA0B,GAAG;MAACR;KAAc,GACrIK,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;","names":["constructableModuleWrapper","BridgeWrapper","ModuleWrapper","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","sendQuery","BridgeExposeQuerySchema","map","address","unexpose","BridgeUnexposeQuerySchema"]}
|
package/dist/browser/index.js
CHANGED
|
@@ -2,12 +2,8 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
4
|
// src/BridgeWrapper.ts
|
|
5
|
-
import {
|
|
6
|
-
import { BridgeConnectQuerySchema, BridgeDisconnectQuerySchema, isBridgeInstance, isBridgeModule } from "@xyo-network/bridge-model";
|
|
7
|
-
import { ModuleManifestPayloadSchema, NodeManifestPayloadSchema } from "@xyo-network/manifest-model";
|
|
8
|
-
import { ModuleDiscoverQuerySchema, ModuleManifestQuerySchema } from "@xyo-network/module-model";
|
|
5
|
+
import { BridgeExposeQuerySchema, BridgeUnexposeQuerySchema, isBridgeInstance, isBridgeModule, ModuleFilterPayloadSchema } from "@xyo-network/bridge-model";
|
|
9
6
|
import { constructableModuleWrapper, ModuleWrapper } from "@xyo-network/module-wrapper";
|
|
10
|
-
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
11
7
|
constructableModuleWrapper();
|
|
12
8
|
var BridgeWrapper = class extends ModuleWrapper {
|
|
13
9
|
static {
|
|
@@ -15,66 +11,29 @@ var BridgeWrapper = class extends ModuleWrapper {
|
|
|
15
11
|
}
|
|
16
12
|
static instanceIdentityCheck = isBridgeInstance;
|
|
17
13
|
static moduleIdentityCheck = isBridgeModule;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
async connect(uri) {
|
|
25
|
-
const queryPayload = {
|
|
26
|
-
schema: BridgeConnectQuerySchema,
|
|
27
|
-
uri
|
|
28
|
-
};
|
|
29
|
-
await this.sendQuery(queryPayload);
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
async disconnect(uri) {
|
|
33
|
-
const queryPayload = {
|
|
34
|
-
schema: BridgeDisconnectQuerySchema,
|
|
35
|
-
uri
|
|
36
|
-
};
|
|
37
|
-
await this.sendQuery(queryPayload);
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
getRootAddress() {
|
|
41
|
-
throw new Error("Method not implemented.");
|
|
42
|
-
}
|
|
43
|
-
targetConfig(address) {
|
|
44
|
-
return this.module.targetConfig(address);
|
|
45
|
-
}
|
|
46
|
-
async targetDiscover(address) {
|
|
47
|
-
const queryPayload = {
|
|
48
|
-
schema: ModuleDiscoverQuerySchema
|
|
14
|
+
async expose(id, options) {
|
|
15
|
+
const filterPayload = {
|
|
16
|
+
id,
|
|
17
|
+
schema: ModuleFilterPayloadSchema,
|
|
18
|
+
...options
|
|
49
19
|
};
|
|
50
|
-
return await this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
20
|
+
return (await this.sendQuery({
|
|
21
|
+
schema: BridgeExposeQuerySchema
|
|
22
|
+
}, [
|
|
23
|
+
filterPayload
|
|
24
|
+
])).map(({ address }) => address);
|
|
25
|
+
}
|
|
26
|
+
async unexpose(id, options) {
|
|
27
|
+
const filterPayload = {
|
|
28
|
+
id,
|
|
29
|
+
schema: ModuleFilterPayloadSchema,
|
|
30
|
+
...options
|
|
56
31
|
};
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
async targetQuery(address, query, payloads) {
|
|
63
|
-
return await this.module.targetQuery(address, query, payloads);
|
|
64
|
-
}
|
|
65
|
-
async targetQueryable(address, query, payloads, queryConfig) {
|
|
66
|
-
return await this.module.targetQueryable(address, query, payloads, queryConfig);
|
|
67
|
-
}
|
|
68
|
-
async targetResolve(address, nameOrAddressOrFilter, options) {
|
|
69
|
-
return await this.module.targetResolve(address, nameOrAddressOrFilter, options);
|
|
70
|
-
}
|
|
71
|
-
async sendTargetQuery(address, queryPayload, payloads) {
|
|
72
|
-
const query = await this.bindQuery(queryPayload, payloads);
|
|
73
|
-
const [, resultPayloads, errors] = await this.module.targetQuery(address, query[0], query[1]);
|
|
74
|
-
if (errors?.length > 0) {
|
|
75
|
-
throw errors[0];
|
|
76
|
-
}
|
|
77
|
-
return resultPayloads;
|
|
32
|
+
return (await this.sendQuery({
|
|
33
|
+
schema: BridgeUnexposeQuerySchema
|
|
34
|
+
}, [
|
|
35
|
+
filterPayload
|
|
36
|
+
])).map(({ address }) => address);
|
|
78
37
|
}
|
|
79
38
|
};
|
|
80
39
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport { AddressPayload } from '@xyo-network/address-payload-plugin'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']>\n{\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(\n ({ address }) => address,\n )\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;AAEA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,gBAAN,cACGC,cAAAA;EAnBV,OAmBUA;;;EAGR,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAAmD;AACpF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YAAQ,MAAM,KAAKI,UAAkE;MAAEF,QAAQG;IAAwB,GAAG;MAACJ;KAAc,GAAGK,IAC1I,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EAErB;EAEA,MAAMC,SAAST,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKI,UAAoE;MAAEF,QAAQO;IAA0B,GAAG;MAACR;KAAc,GACrIK,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;","names":["BridgeExposeQuerySchema","BridgeUnexposeQuerySchema","isBridgeInstance","isBridgeModule","ModuleFilterPayloadSchema","constructableModuleWrapper","ModuleWrapper","constructableModuleWrapper","BridgeWrapper","ModuleWrapper","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","sendQuery","BridgeExposeQuerySchema","map","address","unexpose","BridgeUnexposeQuerySchema"]}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BridgeInstance, BridgeModule } from '@xyo-network/bridge-model';
|
|
5
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
6
|
-
import { ModuleConfig, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleQueryResult } from '@xyo-network/module-model';
|
|
2
|
+
import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
7
4
|
import { ModuleWrapper } from '@xyo-network/module-wrapper';
|
|
8
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
9
5
|
export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
|
|
10
6
|
static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
11
7
|
readonly archivist?: string | undefined;
|
|
@@ -89,59 +85,7 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
|
|
|
89
85
|
}, "schema"> & {
|
|
90
86
|
schema: string;
|
|
91
87
|
}>, import("@xyo-network/module-model").ModuleEventData<object>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
95
|
-
config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
96
|
-
readonly archivist?: string | undefined;
|
|
97
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
98
|
-
readonly name?: string | undefined;
|
|
99
|
-
readonly paging?: Record<string, {
|
|
100
|
-
size?: number | undefined;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
103
|
-
schema: "network.xyo.module.config";
|
|
104
|
-
readonly security?: {
|
|
105
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
106
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
107
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
readonly sign?: boolean | undefined;
|
|
110
|
-
readonly storeQueries?: boolean | undefined;
|
|
111
|
-
readonly timestamp?: boolean | undefined;
|
|
112
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
|
|
113
|
-
readonly archivist?: string | undefined;
|
|
114
|
-
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
115
|
-
readonly name?: string | undefined;
|
|
116
|
-
readonly paging?: Record<string, {
|
|
117
|
-
size?: number | undefined;
|
|
118
|
-
}> | undefined;
|
|
119
|
-
readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
|
|
120
|
-
schema: "network.xyo.module.config";
|
|
121
|
-
readonly security?: {
|
|
122
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
123
|
-
readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
124
|
-
readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
readonly sign?: boolean | undefined;
|
|
127
|
-
readonly storeQueries?: boolean | undefined;
|
|
128
|
-
readonly timestamp?: boolean | undefined;
|
|
129
|
-
}, "schema"> & {
|
|
130
|
-
schema: string;
|
|
131
|
-
};
|
|
132
|
-
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
133
|
-
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
134
|
-
connect(uri?: string): Promise<boolean>;
|
|
135
|
-
disconnect(uri?: string): Promise<boolean>;
|
|
136
|
-
getRootAddress(): Promisable<Address>;
|
|
137
|
-
targetConfig(address: Address): ModuleConfig;
|
|
138
|
-
targetDiscover(address: Address): Promise<Payload[]>;
|
|
139
|
-
targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload>;
|
|
140
|
-
targetQueries(address: Address): string[];
|
|
141
|
-
targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult>;
|
|
142
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean>;
|
|
143
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>;
|
|
144
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>;
|
|
145
|
-
protected sendTargetQuery<T extends Query>(address: Address, queryPayload: T, payloads?: Payload[]): Promise<Payload[]>;
|
|
88
|
+
expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]>;
|
|
89
|
+
unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
|
|
146
90
|
}
|
|
147
91
|
//# sourceMappingURL=BridgeWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEnD,OAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAmB;IACxD,OAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAAiB;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAO/E,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -31,74 +31,33 @@ __export(src_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(src_exports);
|
|
32
32
|
|
|
33
33
|
// src/BridgeWrapper.ts
|
|
34
|
-
var import_assert = require("@xylabs/assert");
|
|
35
34
|
var import_bridge_model = require("@xyo-network/bridge-model");
|
|
36
|
-
var import_manifest_model = require("@xyo-network/manifest-model");
|
|
37
|
-
var import_module_model = require("@xyo-network/module-model");
|
|
38
35
|
var import_module_wrapper = require("@xyo-network/module-wrapper");
|
|
39
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
|
40
36
|
(0, import_module_wrapper.constructableModuleWrapper)();
|
|
41
37
|
var _BridgeWrapper = class _BridgeWrapper extends import_module_wrapper.ModuleWrapper {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
async connect(uri) {
|
|
49
|
-
const queryPayload = {
|
|
50
|
-
schema: import_bridge_model.BridgeConnectQuerySchema,
|
|
51
|
-
uri
|
|
38
|
+
async expose(id, options) {
|
|
39
|
+
const filterPayload = {
|
|
40
|
+
id,
|
|
41
|
+
schema: import_bridge_model.ModuleFilterPayloadSchema,
|
|
42
|
+
...options
|
|
52
43
|
};
|
|
53
|
-
await this.sendQuery(
|
|
54
|
-
|
|
44
|
+
return (await this.sendQuery({
|
|
45
|
+
schema: import_bridge_model.BridgeExposeQuerySchema
|
|
46
|
+
}, [
|
|
47
|
+
filterPayload
|
|
48
|
+
])).map(({ address }) => address);
|
|
55
49
|
}
|
|
56
|
-
async
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
async unexpose(id, options) {
|
|
51
|
+
const filterPayload = {
|
|
52
|
+
id,
|
|
53
|
+
schema: import_bridge_model.ModuleFilterPayloadSchema,
|
|
54
|
+
...options
|
|
60
55
|
};
|
|
61
|
-
await this.sendQuery(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
targetConfig(address) {
|
|
68
|
-
return this.module.targetConfig(address);
|
|
69
|
-
}
|
|
70
|
-
async targetDiscover(address) {
|
|
71
|
-
const queryPayload = {
|
|
72
|
-
schema: import_module_model.ModuleDiscoverQuerySchema
|
|
73
|
-
};
|
|
74
|
-
return await this.sendTargetQuery(address, queryPayload);
|
|
75
|
-
}
|
|
76
|
-
async targetManifest(address, maxDepth) {
|
|
77
|
-
const queryPayload = {
|
|
78
|
-
maxDepth,
|
|
79
|
-
schema: import_module_model.ModuleManifestQuerySchema
|
|
80
|
-
};
|
|
81
|
-
return (0, import_assert.assertEx)((await this.sendTargetQuery(address, queryPayload)).find((0, import_payload_model.isPayloadOfSchemaType)(import_manifest_model.ModuleManifestPayloadSchema) || (0, import_payload_model.isPayloadOfSchemaType)(import_manifest_model.NodeManifestPayloadSchema)));
|
|
82
|
-
}
|
|
83
|
-
targetQueries(address) {
|
|
84
|
-
return this.module.targetQueries(address);
|
|
85
|
-
}
|
|
86
|
-
async targetQuery(address, query, payloads) {
|
|
87
|
-
return await this.module.targetQuery(address, query, payloads);
|
|
88
|
-
}
|
|
89
|
-
async targetQueryable(address, query, payloads, queryConfig) {
|
|
90
|
-
return await this.module.targetQueryable(address, query, payloads, queryConfig);
|
|
91
|
-
}
|
|
92
|
-
async targetResolve(address, nameOrAddressOrFilter, options) {
|
|
93
|
-
return await this.module.targetResolve(address, nameOrAddressOrFilter, options);
|
|
94
|
-
}
|
|
95
|
-
async sendTargetQuery(address, queryPayload, payloads) {
|
|
96
|
-
const query = await this.bindQuery(queryPayload, payloads);
|
|
97
|
-
const [, resultPayloads, errors] = await this.module.targetQuery(address, query[0], query[1]);
|
|
98
|
-
if ((errors == null ? void 0 : errors.length) > 0) {
|
|
99
|
-
throw errors[0];
|
|
100
|
-
}
|
|
101
|
-
return resultPayloads;
|
|
56
|
+
return (await this.sendQuery({
|
|
57
|
+
schema: import_bridge_model.BridgeUnexposeQuerySchema
|
|
58
|
+
}, [
|
|
59
|
+
filterPayload
|
|
60
|
+
])).map(({ address }) => address);
|
|
102
61
|
}
|
|
103
62
|
};
|
|
104
63
|
__name(_BridgeWrapper, "BridgeWrapper");
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper'\n","import {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper'\n","import { Address } from '@xylabs/hex'\nimport { AddressPayload } from '@xyo-network/address-payload-plugin'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']>\n{\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(\n ({ address }) => address,\n )\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACEA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,oCAAAA;EAMR,MAAMC,OAAOC,IAAsBC,SAAmD;AACpF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YAAQ,MAAM,KAAKI,UAAkE;MAAEF,QAAQG;IAAwB,GAAG;MAACJ;KAAc,GAAGK,IAC1I,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EAErB;EAEA,MAAMC,SAAST,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKI,UAAoE;MAAEF,QAAQO;IAA0B,GAAG;MAACR;KAAc,GACrIK,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;AAnBUV;AAGR,cAJWD,gBAIKc,yBAAwBC;AACxC,cALWf,gBAKKgB,uBAAsBC;AALjC,IAAMjB,gBAAN;","names":["constructableModuleWrapper","BridgeWrapper","ModuleWrapper","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","sendQuery","BridgeExposeQuerySchema","map","address","unexpose","BridgeUnexposeQuerySchema","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule"]}
|
package/dist/node/index.js
CHANGED
|
@@ -7,74 +7,33 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/BridgeWrapper.ts
|
|
10
|
-
import {
|
|
11
|
-
import { BridgeConnectQuerySchema, BridgeDisconnectQuerySchema, isBridgeInstance, isBridgeModule } from "@xyo-network/bridge-model";
|
|
12
|
-
import { ModuleManifestPayloadSchema, NodeManifestPayloadSchema } from "@xyo-network/manifest-model";
|
|
13
|
-
import { ModuleDiscoverQuerySchema, ModuleManifestQuerySchema } from "@xyo-network/module-model";
|
|
10
|
+
import { BridgeExposeQuerySchema, BridgeUnexposeQuerySchema, isBridgeInstance, isBridgeModule, ModuleFilterPayloadSchema } from "@xyo-network/bridge-model";
|
|
14
11
|
import { constructableModuleWrapper, ModuleWrapper } from "@xyo-network/module-wrapper";
|
|
15
|
-
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
16
12
|
constructableModuleWrapper();
|
|
17
13
|
var _BridgeWrapper = class _BridgeWrapper extends ModuleWrapper {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
async connect(uri) {
|
|
25
|
-
const queryPayload = {
|
|
26
|
-
schema: BridgeConnectQuerySchema,
|
|
27
|
-
uri
|
|
28
|
-
};
|
|
29
|
-
await this.sendQuery(queryPayload);
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
async disconnect(uri) {
|
|
33
|
-
const queryPayload = {
|
|
34
|
-
schema: BridgeDisconnectQuerySchema,
|
|
35
|
-
uri
|
|
36
|
-
};
|
|
37
|
-
await this.sendQuery(queryPayload);
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
getRootAddress() {
|
|
41
|
-
throw new Error("Method not implemented.");
|
|
42
|
-
}
|
|
43
|
-
targetConfig(address) {
|
|
44
|
-
return this.module.targetConfig(address);
|
|
45
|
-
}
|
|
46
|
-
async targetDiscover(address) {
|
|
47
|
-
const queryPayload = {
|
|
48
|
-
schema: ModuleDiscoverQuerySchema
|
|
14
|
+
async expose(id, options) {
|
|
15
|
+
const filterPayload = {
|
|
16
|
+
id,
|
|
17
|
+
schema: ModuleFilterPayloadSchema,
|
|
18
|
+
...options
|
|
49
19
|
};
|
|
50
|
-
return await this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
20
|
+
return (await this.sendQuery({
|
|
21
|
+
schema: BridgeExposeQuerySchema
|
|
22
|
+
}, [
|
|
23
|
+
filterPayload
|
|
24
|
+
])).map(({ address }) => address);
|
|
25
|
+
}
|
|
26
|
+
async unexpose(id, options) {
|
|
27
|
+
const filterPayload = {
|
|
28
|
+
id,
|
|
29
|
+
schema: ModuleFilterPayloadSchema,
|
|
30
|
+
...options
|
|
56
31
|
};
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
async targetQuery(address, query, payloads) {
|
|
63
|
-
return await this.module.targetQuery(address, query, payloads);
|
|
64
|
-
}
|
|
65
|
-
async targetQueryable(address, query, payloads, queryConfig) {
|
|
66
|
-
return await this.module.targetQueryable(address, query, payloads, queryConfig);
|
|
67
|
-
}
|
|
68
|
-
async targetResolve(address, nameOrAddressOrFilter, options) {
|
|
69
|
-
return await this.module.targetResolve(address, nameOrAddressOrFilter, options);
|
|
70
|
-
}
|
|
71
|
-
async sendTargetQuery(address, queryPayload, payloads) {
|
|
72
|
-
const query = await this.bindQuery(queryPayload, payloads);
|
|
73
|
-
const [, resultPayloads, errors] = await this.module.targetQuery(address, query[0], query[1]);
|
|
74
|
-
if ((errors == null ? void 0 : errors.length) > 0) {
|
|
75
|
-
throw errors[0];
|
|
76
|
-
}
|
|
77
|
-
return resultPayloads;
|
|
32
|
+
return (await this.sendQuery({
|
|
33
|
+
schema: BridgeUnexposeQuerySchema
|
|
34
|
+
}, [
|
|
35
|
+
filterPayload
|
|
36
|
+
])).map(({ address }) => address);
|
|
78
37
|
}
|
|
79
38
|
};
|
|
80
39
|
__name(_BridgeWrapper, "BridgeWrapper");
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport { AddressPayload } from '@xyo-network/address-payload-plugin'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']>\n{\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(\n ({ address }) => address,\n )\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;AAEA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,cAAAA;EAMR,MAAMC,OAAOC,IAAsBC,SAAmD;AACpF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YAAQ,MAAM,KAAKI,UAAkE;MAAEF,QAAQG;IAAwB,GAAG;MAACJ;KAAc,GAAGK,IAC1I,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EAErB;EAEA,MAAMC,SAAST,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKI,UAAoE;MAAEF,QAAQO;IAA0B,GAAG;MAACR;KAAc,GACrIK,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;AAnBUV;AAGR,cAJWD,gBAIKc,yBAAwBC;AACxC,cALWf,gBAKKgB,uBAAsBC;AALjC,IAAMjB,gBAAN;","names":["BridgeExposeQuerySchema","BridgeUnexposeQuerySchema","isBridgeInstance","isBridgeModule","ModuleFilterPayloadSchema","constructableModuleWrapper","ModuleWrapper","constructableModuleWrapper","BridgeWrapper","ModuleWrapper","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","sendQuery","BridgeExposeQuerySchema","map","address","unexpose","BridgeUnexposeQuerySchema","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule"]}
|
package/package.json
CHANGED
|
@@ -10,15 +10,11 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^3.0.3",
|
|
14
13
|
"@xylabs/hex": "^3.0.3",
|
|
15
|
-
"@
|
|
16
|
-
"@xyo-network/
|
|
17
|
-
"@xyo-network/
|
|
18
|
-
"@xyo-network/
|
|
19
|
-
"@xyo-network/module-model": "~2.91.2",
|
|
20
|
-
"@xyo-network/module-wrapper": "~2.91.2",
|
|
21
|
-
"@xyo-network/payload-model": "~2.91.2"
|
|
14
|
+
"@xyo-network/address-payload-plugin": "~2.92.0-rc.2",
|
|
15
|
+
"@xyo-network/bridge-model": "~2.92.0-rc.2",
|
|
16
|
+
"@xyo-network/module-model": "~2.92.0-rc.2",
|
|
17
|
+
"@xyo-network/module-wrapper": "~2.92.0-rc.2"
|
|
22
18
|
},
|
|
23
19
|
"devDependencies": {
|
|
24
20
|
"@xylabs/ts-scripts-yarn3": "^3.4.1",
|
|
@@ -64,6 +60,7 @@
|
|
|
64
60
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
65
61
|
},
|
|
66
62
|
"sideEffects": false,
|
|
67
|
-
"version": "2.
|
|
68
|
-
"type": "module"
|
|
63
|
+
"version": "2.92.0-rc.2",
|
|
64
|
+
"type": "module",
|
|
65
|
+
"stableVersion": "2.91.2"
|
|
69
66
|
}
|
package/src/BridgeWrapper.ts
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { assertEx } from '@xylabs/assert'
|
|
2
1
|
import { Address } from '@xylabs/hex'
|
|
3
|
-
import {
|
|
4
|
-
import { QueryBoundWitness } from '@xyo-network/boundwitness-model'
|
|
2
|
+
import { AddressPayload } from '@xyo-network/address-payload-plugin'
|
|
5
3
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
BridgeExposeOptions,
|
|
5
|
+
BridgeExposeQuery,
|
|
6
|
+
BridgeExposeQuerySchema,
|
|
8
7
|
BridgeInstance,
|
|
9
8
|
BridgeModule,
|
|
10
|
-
|
|
9
|
+
BridgeUnexposeOptions,
|
|
10
|
+
BridgeUnexposeQuery,
|
|
11
|
+
BridgeUnexposeQuerySchema,
|
|
11
12
|
isBridgeInstance,
|
|
12
13
|
isBridgeModule,
|
|
14
|
+
ModuleFilterPayload,
|
|
15
|
+
ModuleFilterPayloadSchema,
|
|
13
16
|
} from '@xyo-network/bridge-model'
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
ModuleConfig,
|
|
17
|
-
ModuleDiscoverQuery,
|
|
18
|
-
ModuleDiscoverQuerySchema,
|
|
19
|
-
ModuleFilter,
|
|
20
|
-
ModuleFilterOptions,
|
|
21
|
-
ModuleInstance,
|
|
22
|
-
ModuleManifestQuery,
|
|
23
|
-
ModuleManifestQuerySchema,
|
|
24
|
-
ModuleQueryResult,
|
|
25
|
-
} from '@xyo-network/module-model'
|
|
17
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
26
18
|
import { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'
|
|
27
|
-
import { isPayloadOfSchemaType, Payload, Query } from '@xyo-network/payload-model'
|
|
28
19
|
|
|
29
20
|
constructableModuleWrapper()
|
|
30
21
|
export class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>
|
|
@@ -34,77 +25,17 @@ export class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>
|
|
|
34
25
|
static override instanceIdentityCheck = isBridgeInstance
|
|
35
26
|
static override moduleIdentityCheck = isBridgeModule
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return this.module.targetDownResolver
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async connect(uri?: string): Promise<boolean> {
|
|
46
|
-
const queryPayload: BridgeQueries = { schema: BridgeConnectQuerySchema, uri }
|
|
47
|
-
await this.sendQuery(queryPayload)
|
|
48
|
-
return true
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async disconnect(uri?: string): Promise<boolean> {
|
|
52
|
-
const queryPayload: BridgeQueries = { schema: BridgeDisconnectQuerySchema, uri }
|
|
53
|
-
await this.sendQuery(queryPayload)
|
|
54
|
-
return true
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
getRootAddress(): Promisable<Address> {
|
|
58
|
-
throw new Error('Method not implemented.')
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
targetConfig(address: Address): ModuleConfig {
|
|
62
|
-
return this.module.targetConfig(address)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async targetDiscover(address: Address): Promise<Payload[]> {
|
|
66
|
-
const queryPayload: ModuleDiscoverQuery = { schema: ModuleDiscoverQuerySchema }
|
|
67
|
-
return await this.sendTargetQuery(address, queryPayload)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async targetManifest(address: Address, maxDepth?: number): Promise<ModuleManifestPayload> {
|
|
71
|
-
const queryPayload: ModuleManifestQuery = { maxDepth, schema: ModuleManifestQuerySchema }
|
|
72
|
-
return assertEx(
|
|
73
|
-
(await this.sendTargetQuery(address, queryPayload)).find(
|
|
74
|
-
isPayloadOfSchemaType(ModuleManifestPayloadSchema) || isPayloadOfSchemaType(NodeManifestPayloadSchema),
|
|
75
|
-
),
|
|
76
|
-
) as ModuleManifestPayload
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
targetQueries(address: Address): string[] {
|
|
80
|
-
return this.module.targetQueries(address)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
async targetQuery<T extends QueryBoundWitness = QueryBoundWitness>(address: Address, query: T, payloads?: Payload[]): Promise<ModuleQueryResult> {
|
|
84
|
-
return await this.module.targetQuery(address, query, payloads)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promise<boolean> {
|
|
88
|
-
return await this.module.targetQueryable(address, query, payloads, queryConfig)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promise<ModuleInstance[]>
|
|
92
|
-
async targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promise<ModuleInstance | undefined>
|
|
93
|
-
async targetResolve(
|
|
94
|
-
address: Address,
|
|
95
|
-
nameOrAddressOrFilter?: ModuleFilter | string,
|
|
96
|
-
options?: ModuleFilterOptions,
|
|
97
|
-
): Promise<Promisable<ModuleInstance | ModuleInstance[] | undefined>> {
|
|
98
|
-
return await this.module.targetResolve(address, nameOrAddressOrFilter, options)
|
|
28
|
+
async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<Address[]> {
|
|
29
|
+
const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }
|
|
30
|
+
return (await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(
|
|
31
|
+
({ address }) => address,
|
|
32
|
+
)
|
|
99
33
|
}
|
|
100
34
|
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
throw errors[0]
|
|
107
|
-
}
|
|
108
|
-
return resultPayloads
|
|
35
|
+
async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {
|
|
36
|
+
const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }
|
|
37
|
+
return (
|
|
38
|
+
await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])
|
|
39
|
+
).map(({ address }) => address)
|
|
109
40
|
}
|
|
110
41
|
}
|