@5ive-tech/sdk 1.1.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/README.md +279 -0
- package/dist/FiveSDK.d.ts +336 -0
- package/dist/FiveSDK.js +395 -0
- package/dist/accounts/index.d.ts +254 -0
- package/dist/accounts/index.js +543 -0
- package/dist/assets/vm/dummy.file +0 -0
- package/dist/assets/vm/five_vm_wasm.d.ts +762 -0
- package/dist/assets/vm/five_vm_wasm.js +3754 -0
- package/dist/assets/vm/five_vm_wasm_bg.js +3307 -0
- package/dist/assets/vm/five_vm_wasm_bg.wasm +0 -0
- package/dist/assets/vm/five_vm_wasm_bg.wasm.d.ts +247 -0
- package/dist/assets/vm/package.json +11 -0
- package/dist/bin/gen-types.d.ts +2 -0
- package/dist/bin/gen-types.js +35 -0
- package/dist/compiler/BytecodeCompiler.d.ts +83 -0
- package/dist/compiler/BytecodeCompiler.js +379 -0
- package/dist/config/ConfigManager.d.ts +13 -0
- package/dist/config/ConfigManager.js +27 -0
- package/dist/config/ProgramIdResolver.d.ts +62 -0
- package/dist/config/ProgramIdResolver.js +104 -0
- package/dist/crypto/index.d.ts +211 -0
- package/dist/crypto/index.js +451 -0
- package/dist/encoding/ParameterEncoder.d.ts +31 -0
- package/dist/encoding/ParameterEncoder.js +278 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +28 -0
- package/dist/lib/bytecode-encoder.d.ts +62 -0
- package/dist/lib/bytecode-encoder.js +281 -0
- package/dist/logging/index.d.ts +9 -0
- package/dist/logging/index.js +10 -0
- package/dist/metadata/index.d.ts +213 -0
- package/dist/metadata/index.js +296 -0
- package/dist/modules/accounts.d.ts +60 -0
- package/dist/modules/accounts.js +275 -0
- package/dist/modules/deploy.d.ts +90 -0
- package/dist/modules/deploy.js +1118 -0
- package/dist/modules/execute.d.ts +90 -0
- package/dist/modules/execute.js +649 -0
- package/dist/modules/fees.d.ts +14 -0
- package/dist/modules/fees.js +112 -0
- package/dist/modules/namespaces.d.ts +39 -0
- package/dist/modules/namespaces.js +190 -0
- package/dist/modules/state-diff.d.ts +35 -0
- package/dist/modules/state-diff.js +342 -0
- package/dist/modules/vm-state.d.ts +7 -0
- package/dist/modules/vm-state.js +44 -0
- package/dist/program/AccountResolver.d.ts +67 -0
- package/dist/program/AccountResolver.js +134 -0
- package/dist/program/BorshSchemaGenerator.d.ts +8 -0
- package/dist/program/BorshSchemaGenerator.js +57 -0
- package/dist/program/FiveProgram.d.ts +144 -0
- package/dist/program/FiveProgram.js +282 -0
- package/dist/program/FunctionBuilder.d.ts +114 -0
- package/dist/program/FunctionBuilder.js +347 -0
- package/dist/program/ProgramAccount.d.ts +38 -0
- package/dist/program/ProgramAccount.js +170 -0
- package/dist/program/TypeGenerator.d.ts +90 -0
- package/dist/program/TypeGenerator.js +195 -0
- package/dist/program/index.d.ts +24 -0
- package/dist/program/index.js +21 -0
- package/dist/project/config.d.ts +5 -0
- package/dist/project/config.js +33 -0
- package/dist/project/toml.d.ts +6 -0
- package/dist/project/toml.js +43 -0
- package/dist/project/workspace.d.ts +160 -0
- package/dist/project/workspace.js +73 -0
- package/dist/testing/AccountMetaGenerator.d.ts +121 -0
- package/dist/testing/AccountMetaGenerator.js +261 -0
- package/dist/testing/AccountTestFixture.d.ts +211 -0
- package/dist/testing/AccountTestFixture.js +530 -0
- package/dist/testing/OnChainAccountManager.d.ts +81 -0
- package/dist/testing/OnChainAccountManager.js +260 -0
- package/dist/testing/StateSerializer.d.ts +65 -0
- package/dist/testing/StateSerializer.js +330 -0
- package/dist/testing/TestDiscovery.d.ts +79 -0
- package/dist/testing/TestDiscovery.js +274 -0
- package/dist/testing/TestRunner.d.ts +117 -0
- package/dist/testing/TestRunner.js +346 -0
- package/dist/testing/index.d.ts +14 -0
- package/dist/testing/index.js +13 -0
- package/dist/types.d.ts +356 -0
- package/dist/types.js +32 -0
- package/dist/utils/abi.d.ts +31 -0
- package/dist/utils/abi.js +92 -0
- package/dist/utils/transaction.d.ts +5 -0
- package/dist/utils/transaction.js +48 -0
- package/dist/validation/InputValidator.d.ts +142 -0
- package/dist/validation/InputValidator.js +332 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/index.js +4 -0
- package/dist/wasm/compiler/AbiLogic.d.ts +4 -0
- package/dist/wasm/compiler/AbiLogic.js +37 -0
- package/dist/wasm/compiler/AnalysisLogic.d.ts +6 -0
- package/dist/wasm/compiler/AnalysisLogic.js +61 -0
- package/dist/wasm/compiler/CompilationLogic.d.ts +10 -0
- package/dist/wasm/compiler/CompilationLogic.js +431 -0
- package/dist/wasm/compiler/FiveCompiler.d.ts +48 -0
- package/dist/wasm/compiler/FiveCompiler.js +183 -0
- package/dist/wasm/compiler/InfoLogic.d.ts +6 -0
- package/dist/wasm/compiler/InfoLogic.js +24 -0
- package/dist/wasm/compiler/OptimizationLogic.d.ts +2 -0
- package/dist/wasm/compiler/OptimizationLogic.js +13 -0
- package/dist/wasm/compiler/ValidationLogic.d.ts +7 -0
- package/dist/wasm/compiler/ValidationLogic.js +26 -0
- package/dist/wasm/compiler/index.d.ts +2 -0
- package/dist/wasm/compiler/index.js +2 -0
- package/dist/wasm/compiler/types.d.ts +8 -0
- package/dist/wasm/compiler/types.js +1 -0
- package/dist/wasm/compiler/utils.d.ts +8 -0
- package/dist/wasm/compiler/utils.js +75 -0
- package/dist/wasm/index.d.ts +9 -0
- package/dist/wasm/index.js +12 -0
- package/dist/wasm/instance.d.ts +1 -0
- package/dist/wasm/instance.js +26 -0
- package/dist/wasm/loader.d.ts +7 -0
- package/dist/wasm/loader.js +112 -0
- package/dist/wasm/vm.d.ts +33 -0
- package/dist/wasm/vm.js +250 -0
- package/package.json +59 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { FiveScriptSource, FiveBytecode, SerializedExecution } from "../types.js";
|
|
2
|
+
import { BytecodeCompiler } from "../compiler/BytecodeCompiler.js";
|
|
3
|
+
export declare function execute(compiler: BytecodeCompiler, source: FiveScriptSource | string, functionName: string | number, parameters?: any[], options?: {
|
|
4
|
+
debug?: boolean;
|
|
5
|
+
trace?: boolean;
|
|
6
|
+
optimize?: boolean;
|
|
7
|
+
computeUnitLimit?: number;
|
|
8
|
+
vmStateAccount?: string;
|
|
9
|
+
accounts?: string[];
|
|
10
|
+
}): Promise<{
|
|
11
|
+
success: boolean;
|
|
12
|
+
compilationErrors: import("../types.js").CompilationError[];
|
|
13
|
+
error: string;
|
|
14
|
+
} | {
|
|
15
|
+
compilation: import("../types.js").CompilationResult;
|
|
16
|
+
bytecodeSize: number;
|
|
17
|
+
functions: any[];
|
|
18
|
+
success: boolean;
|
|
19
|
+
result?: any;
|
|
20
|
+
logs?: string[];
|
|
21
|
+
computeUnitsUsed?: number;
|
|
22
|
+
executionTime?: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
trace?: any[];
|
|
25
|
+
compilationErrors?: undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function executeLocally(bytecode: FiveBytecode, functionName: string | number, parameters?: any[], options?: {
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
trace?: boolean;
|
|
30
|
+
computeUnitLimit?: number;
|
|
31
|
+
abi?: any;
|
|
32
|
+
accounts?: string[];
|
|
33
|
+
}): Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
result?: any;
|
|
36
|
+
logs?: string[];
|
|
37
|
+
computeUnitsUsed?: number;
|
|
38
|
+
executionTime?: number;
|
|
39
|
+
error?: string;
|
|
40
|
+
trace?: any[];
|
|
41
|
+
}>;
|
|
42
|
+
export declare function generateExecuteInstruction(scriptAccount: string, functionName: string | number, parameters?: any[], accounts?: string[], connection?: any, options?: {
|
|
43
|
+
debug?: boolean;
|
|
44
|
+
computeUnitLimit?: number;
|
|
45
|
+
vmStateAccount?: string;
|
|
46
|
+
fiveVMProgramId?: string;
|
|
47
|
+
abi?: any;
|
|
48
|
+
adminAccount?: string;
|
|
49
|
+
estimateFees?: boolean;
|
|
50
|
+
accountMetadata?: Map<string, {
|
|
51
|
+
isSigner: boolean;
|
|
52
|
+
isWritable: boolean;
|
|
53
|
+
isSystemAccount?: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
}): Promise<SerializedExecution>;
|
|
56
|
+
export declare function executeOnSolana(scriptAccount: string, connection: any, signerKeypair: any, functionName: string | number, parameters?: any[], accounts?: string[], options?: {
|
|
57
|
+
debug?: boolean;
|
|
58
|
+
network?: string;
|
|
59
|
+
computeUnitLimit?: number;
|
|
60
|
+
computeUnitPrice?: number;
|
|
61
|
+
maxRetries?: number;
|
|
62
|
+
skipPreflight?: boolean;
|
|
63
|
+
vmStateAccount?: string;
|
|
64
|
+
fiveVMProgramId?: string;
|
|
65
|
+
abi?: any;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
success: boolean;
|
|
68
|
+
result?: any;
|
|
69
|
+
transactionId?: string;
|
|
70
|
+
computeUnitsUsed?: number;
|
|
71
|
+
cost?: number;
|
|
72
|
+
error?: string;
|
|
73
|
+
logs?: string[];
|
|
74
|
+
}>;
|
|
75
|
+
export declare function executeScriptAccount(scriptAccount: string, functionIndex: number, parameters: any[], connection: any, signerKeypair: any, options?: {
|
|
76
|
+
debug?: boolean;
|
|
77
|
+
network?: string;
|
|
78
|
+
computeBudget?: number;
|
|
79
|
+
maxRetries?: number;
|
|
80
|
+
vmStateAccount?: string;
|
|
81
|
+
fiveVMProgramId?: string;
|
|
82
|
+
}): Promise<{
|
|
83
|
+
success: boolean;
|
|
84
|
+
result?: any;
|
|
85
|
+
transactionId?: string;
|
|
86
|
+
computeUnitsUsed?: number;
|
|
87
|
+
cost?: number;
|
|
88
|
+
error?: string;
|
|
89
|
+
logs?: string[];
|
|
90
|
+
}>;
|