@vleap/warps-adapter-multiversx 0.2.0-alpha.8 → 0.2.0-beta.77
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/index.d.cts +291 -0
- package/dist/index.d.ts +179 -48
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +18 -11
- package/dist/index.d.mts +0 -160
package/dist/index.d.mts
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { WarpInitConfig, Adapter, WarpAbi, WarpCacheConfig, WarpContractAction, WarpQueryAction, WarpBrand, AdapterWarpBuilder, Warp, WarpChainInfo, WarpContract, WarpContractVerification, AdapterWarpExecutor, WarpExecutable, WarpExecution, WarpActionInputType, WarpChainEnv, AdapterWarpRegistry, WarpRegistryConfigInfo, WarpRegistryInfo, WarpChain, AdapterWarpResults, ResolvedInput, WarpExecutionResults, AdapterWarpSerializer, WarpSerializer, WarpNativeValue, BaseWarpActionInputType, WarpAdapterGenericType } from '@vleap/warps';
|
|
2
|
-
import { TypedValue, Type, OptionValue, OptionalValue, List, VariadicValue, CompositeValue, StringValue, U8Value, U16Value, U32Value, U64Value, BigUIntValue, BooleanValue, AddressValue, TokenIdentifierValue, BytesValue, TokenTransfer, Struct, CodeMetadataValue, NothingValue, TransactionOnNetwork, AbiRegistry, Transaction, NetworkEntrypoint, Address } from '@multiversx/sdk-core';
|
|
3
|
-
|
|
4
|
-
declare const WarpMultiversxConstants: {
|
|
5
|
-
Egld: {
|
|
6
|
-
Identifier: string;
|
|
7
|
-
EsdtIdentifier: string;
|
|
8
|
-
DisplayName: string;
|
|
9
|
-
Decimals: number;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
declare const getMultiversxAdapter: (config: WarpInitConfig) => Adapter;
|
|
14
|
-
|
|
15
|
-
declare const option_value: (value: TypedValue | null, type?: Type) => OptionValue;
|
|
16
|
-
declare const optional_value: (value: TypedValue | null, type?: Type) => OptionalValue;
|
|
17
|
-
declare const list_value: (values: TypedValue[]) => List;
|
|
18
|
-
declare const variadic_value: (values: TypedValue[]) => VariadicValue;
|
|
19
|
-
declare const composite_value: (values: TypedValue[]) => CompositeValue;
|
|
20
|
-
declare const string_value: (value: string) => StringValue;
|
|
21
|
-
declare const u8_value: (value: number) => U8Value;
|
|
22
|
-
declare const u16_value: (value: number) => U16Value;
|
|
23
|
-
declare const u32_value: (value: number) => U32Value;
|
|
24
|
-
declare const u64_value: (value: bigint) => U64Value;
|
|
25
|
-
declare const biguint_value: (value: bigint | string | number) => BigUIntValue;
|
|
26
|
-
declare const boolean_value: (value: boolean) => BooleanValue;
|
|
27
|
-
declare const address_value: (value: string) => AddressValue;
|
|
28
|
-
declare const token_value: (value: string) => TokenIdentifierValue;
|
|
29
|
-
declare const hex_value: (value: string) => BytesValue;
|
|
30
|
-
declare const esdt_value: (value: TokenTransfer) => Struct;
|
|
31
|
-
declare const codemeta_value: (hexString: string) => CodeMetadataValue;
|
|
32
|
-
declare const nothing_value: () => NothingValue;
|
|
33
|
-
|
|
34
|
-
declare class WarpMultiversxAbi {
|
|
35
|
-
private readonly config;
|
|
36
|
-
private readonly contractLoader;
|
|
37
|
-
private readonly cache;
|
|
38
|
-
constructor(config: WarpInitConfig);
|
|
39
|
-
createFromRaw(encoded: string): Promise<WarpAbi>;
|
|
40
|
-
createFromTransaction(tx: TransactionOnNetwork): Promise<WarpAbi>;
|
|
41
|
-
createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<WarpAbi | null>;
|
|
42
|
-
getAbiForAction(action: WarpContractAction | WarpQueryAction): Promise<AbiRegistry>;
|
|
43
|
-
fetchAbi(action: WarpContractAction | WarpQueryAction): Promise<AbiRegistry>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
declare class WarpMultiversxBrandBuilder {
|
|
47
|
-
private config;
|
|
48
|
-
private core;
|
|
49
|
-
constructor(config: WarpInitConfig);
|
|
50
|
-
createInscriptionTransaction(brand: WarpBrand): Transaction;
|
|
51
|
-
createFromTransaction(tx: TransactionOnNetwork, validateSchema?: boolean): Promise<WarpBrand>;
|
|
52
|
-
createFromTransactionHash(hash: string): Promise<WarpBrand | null>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare class WarpMultiversxBuilder implements AdapterWarpBuilder {
|
|
56
|
-
private config;
|
|
57
|
-
private cache;
|
|
58
|
-
private core;
|
|
59
|
-
constructor(config: WarpInitConfig);
|
|
60
|
-
createInscriptionTransaction(warp: Warp): Transaction;
|
|
61
|
-
createFromTransaction(tx: TransactionOnNetwork, validate?: boolean): Promise<Warp>;
|
|
62
|
-
createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
declare class WarpMultiversxContractLoader {
|
|
66
|
-
private readonly config;
|
|
67
|
-
constructor(config: WarpInitConfig);
|
|
68
|
-
getContract(address: string, chain: WarpChainInfo): Promise<WarpContract | null>;
|
|
69
|
-
getVerificationInfo(address: string, chain: WarpChainInfo): Promise<WarpContractVerification | null>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
declare class WarpMultiversxExecutor implements AdapterWarpExecutor {
|
|
73
|
-
private readonly config;
|
|
74
|
-
private readonly serializer;
|
|
75
|
-
private readonly abi;
|
|
76
|
-
private readonly results;
|
|
77
|
-
constructor(config: WarpInitConfig);
|
|
78
|
-
createTransaction(executable: WarpExecutable): Promise<Transaction>;
|
|
79
|
-
createTransferTransaction(executable: WarpExecutable): Promise<Transaction>;
|
|
80
|
-
createContractCallTransaction(executable: WarpExecutable): Promise<Transaction>;
|
|
81
|
-
executeQuery(executable: WarpExecutable): Promise<WarpExecution>;
|
|
82
|
-
preprocessInput(chain: WarpChainInfo, input: string, type: WarpActionInputType, value: string): Promise<string>;
|
|
83
|
-
static getChainEntrypoint(chainInfo: WarpChainInfo, env: WarpChainEnv): NetworkEntrypoint;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare class WarpMultiversxRegistry implements AdapterWarpRegistry {
|
|
87
|
-
private config;
|
|
88
|
-
private cache;
|
|
89
|
-
registryConfig: WarpRegistryConfigInfo;
|
|
90
|
-
constructor(config: WarpInitConfig);
|
|
91
|
-
init(): Promise<void>;
|
|
92
|
-
createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Transaction;
|
|
93
|
-
createWarpUnregisterTransaction(txHash: string): Transaction;
|
|
94
|
-
createWarpUpgradeTransaction(alias: string, txHash: string): Transaction;
|
|
95
|
-
createWarpAliasSetTransaction(txHash: string, alias: string): Transaction;
|
|
96
|
-
createWarpVerifyTransaction(txHash: string): Transaction;
|
|
97
|
-
createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Transaction;
|
|
98
|
-
createBrandRegisterTransaction(txHash: string): Transaction;
|
|
99
|
-
createWarpBrandingTransaction(warpHash: string, brandHash: string): Transaction;
|
|
100
|
-
getInfoByAlias(alias: string, cache?: WarpCacheConfig): Promise<{
|
|
101
|
-
registryInfo: WarpRegistryInfo | null;
|
|
102
|
-
brand: WarpBrand | null;
|
|
103
|
-
}>;
|
|
104
|
-
getInfoByHash(hash: string, cache?: WarpCacheConfig): Promise<{
|
|
105
|
-
registryInfo: WarpRegistryInfo | null;
|
|
106
|
-
brand: WarpBrand | null;
|
|
107
|
-
}>;
|
|
108
|
-
getUserWarpRegistryInfos(user?: string): Promise<WarpRegistryInfo[]>;
|
|
109
|
-
getUserBrands(user?: string): Promise<WarpBrand[]>;
|
|
110
|
-
getChainInfos(cache?: WarpCacheConfig): Promise<WarpChainInfo[]>;
|
|
111
|
-
getChainInfo(chain: WarpChain, cache?: WarpCacheConfig): Promise<WarpChainInfo | null>;
|
|
112
|
-
setChain(info: WarpChainInfo): Promise<Transaction>;
|
|
113
|
-
removeChain(chain: WarpChain): Promise<Transaction>;
|
|
114
|
-
fetchBrand(hash: string, cache?: WarpCacheConfig): Promise<WarpBrand | null>;
|
|
115
|
-
getRegistryContractAddress(): Address;
|
|
116
|
-
private loadRegistryConfigs;
|
|
117
|
-
private getFactory;
|
|
118
|
-
private getController;
|
|
119
|
-
private isCurrentUserAdmin;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
declare class WarpMultiversxResults implements AdapterWarpResults {
|
|
123
|
-
private readonly config;
|
|
124
|
-
private readonly abi;
|
|
125
|
-
private readonly serializer;
|
|
126
|
-
private readonly cache;
|
|
127
|
-
constructor(config: WarpInitConfig);
|
|
128
|
-
getTransactionExecutionResults(warp: Warp, tx: TransactionOnNetwork): Promise<WarpExecution>;
|
|
129
|
-
extractContractResults(warp: Warp, tx: TransactionOnNetwork, inputs: ResolvedInput[]): Promise<{
|
|
130
|
-
values: any[];
|
|
131
|
-
results: WarpExecutionResults;
|
|
132
|
-
}>;
|
|
133
|
-
extractQueryResults(warp: Warp, typedValues: TypedValue[], actionIndex: number, inputs: ResolvedInput[]): Promise<{
|
|
134
|
-
values: any[];
|
|
135
|
-
results: WarpExecutionResults;
|
|
136
|
-
}>;
|
|
137
|
-
resolveWarpResultsRecursively(props: {
|
|
138
|
-
warp: Warp;
|
|
139
|
-
entryActionIndex: number;
|
|
140
|
-
executor: {
|
|
141
|
-
executeQuery: Function;
|
|
142
|
-
executeCollect: Function;
|
|
143
|
-
};
|
|
144
|
-
inputs: ResolvedInput[];
|
|
145
|
-
meta?: Record<string, any>;
|
|
146
|
-
}): Promise<any>;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
declare class WarpMultiversxSerializer implements AdapterWarpSerializer {
|
|
150
|
-
readonly coreSerializer: WarpSerializer;
|
|
151
|
-
constructor();
|
|
152
|
-
typedToString(value: TypedValue): string;
|
|
153
|
-
typedToNative(value: TypedValue): [WarpActionInputType, WarpNativeValue];
|
|
154
|
-
nativeToTyped(type: WarpActionInputType, value: WarpNativeValue): TypedValue;
|
|
155
|
-
nativeToType(type: BaseWarpActionInputType): WarpAdapterGenericType;
|
|
156
|
-
stringToTyped(value: string): TypedValue;
|
|
157
|
-
typeToString(type: Type): WarpActionInputType;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export { WarpMultiversxAbi, WarpMultiversxBrandBuilder, WarpMultiversxBuilder, WarpMultiversxConstants, WarpMultiversxContractLoader, WarpMultiversxExecutor, WarpMultiversxRegistry, WarpMultiversxResults, WarpMultiversxSerializer, address_value, biguint_value, boolean_value, codemeta_value, composite_value, esdt_value, getMultiversxAdapter, hex_value, list_value, nothing_value, option_value, optional_value, string_value, token_value, u16_value, u32_value, u64_value, u8_value, variadic_value };
|