@provablehq/sdk 0.10.2 → 0.10.3
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/dynamic/browser.cjs +12 -0
- package/dist/dynamic/browser.d.cts +8 -0
- package/dist/dynamic/browser.d.ts +2 -2
- package/dist/dynamic/node.cjs +12 -0
- package/dist/dynamic/node.d.cts +8 -0
- package/dist/dynamic/node.d.ts +2 -2
- package/dist/mainnet/account.d.cts +347 -0
- package/dist/mainnet/browser.cjs +8507 -0
- package/dist/mainnet/browser.cjs.map +1 -0
- package/dist/mainnet/browser.d.cts +72 -0
- package/dist/mainnet/browser.d.ts +2 -2
- package/dist/mainnet/browser.js +55 -31
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/constants.d.cts +40 -0
- package/dist/mainnet/external-signing.d.cts +76 -0
- package/dist/mainnet/integrations/sealance/merkle-tree.d.cts +192 -0
- package/dist/mainnet/keys/keystore/error.d.cts +24 -0
- package/dist/mainnet/keys/keystore/file.d.cts +177 -0
- package/dist/mainnet/keys/keystore/interface.d.cts +161 -0
- package/dist/mainnet/keys/provider/interface.d.cts +170 -0
- package/dist/mainnet/keys/provider/memory.d.cts +213 -0
- package/dist/mainnet/keys/provider/memory.d.ts +6 -2
- package/dist/mainnet/keys/provider/offline.d.cts +365 -0
- package/dist/mainnet/keys/verifier/interface.d.cts +70 -0
- package/dist/mainnet/keys/verifier/memory.d.cts +37 -0
- package/dist/mainnet/keys/verifier/memory.d.ts +1 -1
- package/dist/mainnet/models/authorization.d.cts +6 -0
- package/dist/mainnet/models/authorization.d.ts +2 -2
- package/dist/mainnet/models/blockJSON.d.cts +33 -0
- package/dist/mainnet/models/confirmed_transaction.d.cts +9 -0
- package/dist/mainnet/models/cryptoBoxPubkey.d.cts +4 -0
- package/dist/mainnet/models/deployment/deploymentJSON.d.cts +6 -0
- package/dist/mainnet/models/deployment/deploymentObject.d.cts +6 -0
- package/dist/mainnet/models/encryptedProvingRequest.d.cts +4 -0
- package/dist/mainnet/models/execution/executionJSON.d.cts +11 -0
- package/dist/mainnet/models/execution/executionObject.d.cts +11 -0
- package/dist/mainnet/models/external-signing.d.cts +123 -0
- package/dist/mainnet/models/finalizeJSON.d.cts +6 -0
- package/dist/mainnet/models/functionInput.d.cts +7 -0
- package/dist/mainnet/models/functionObject.d.cts +8 -0
- package/dist/mainnet/models/imports.d.cts +7 -0
- package/dist/mainnet/models/input/inputJSON.d.cts +10 -0
- package/dist/mainnet/models/input/inputObject.d.cts +15 -0
- package/dist/mainnet/models/inputID.d.cts +4 -0
- package/dist/mainnet/models/keyPair.d.cts +4 -0
- package/dist/mainnet/models/output/outputJSON.d.cts +7 -0
- package/dist/mainnet/models/output/outputObject.d.cts +18 -0
- package/dist/mainnet/models/owner/ownerJSON.d.cts +4 -0
- package/dist/mainnet/models/owner/ownerObject.d.cts +5 -0
- package/dist/mainnet/models/plaintext/array.d.cts +3 -0
- package/dist/mainnet/models/plaintext/literal.d.cts +1 -0
- package/dist/mainnet/models/plaintext/plaintext.d.cts +5 -0
- package/dist/mainnet/models/plaintext/struct.d.cts +5 -0
- package/dist/mainnet/models/provingRequest.d.cts +6 -0
- package/dist/mainnet/models/provingRequest.d.ts +1 -1
- package/dist/mainnet/models/provingResponse.d.cts +51 -0
- package/dist/mainnet/models/ratification.d.cts +4 -0
- package/dist/mainnet/models/record-provider/encryptedRecord.d.cts +58 -0
- package/dist/mainnet/models/record-provider/ownedRecord.d.cts +60 -0
- package/dist/mainnet/models/record-provider/recordSearchParams.d.cts +19 -0
- package/dist/mainnet/models/record-scanner/encryptedRecordsResult.d.cts +7 -0
- package/dist/mainnet/models/record-scanner/encryptedRegistrationRequest.d.cts +8 -0
- package/dist/mainnet/models/record-scanner/error.d.cts +47 -0
- package/dist/mainnet/models/record-scanner/error.d.ts +1 -1
- package/dist/mainnet/models/record-scanner/ownedFilter.d.cts +22 -0
- package/dist/mainnet/models/record-scanner/ownedFilter.d.ts +3 -3
- package/dist/mainnet/models/record-scanner/ownedRecordsResponseFilter.d.cts +42 -0
- package/dist/mainnet/models/record-scanner/ownedRecordsResult.d.cts +13 -0
- package/dist/mainnet/models/record-scanner/recordsFilter.d.cts +35 -0
- package/dist/mainnet/models/record-scanner/recordsFilter.d.ts +2 -2
- package/dist/mainnet/models/record-scanner/recordsResponseFilter.d.cts +42 -0
- package/dist/mainnet/models/record-scanner/registrationRequest.d.cts +13 -0
- package/dist/mainnet/models/record-scanner/registrationResponse.d.cts +13 -0
- package/dist/mainnet/models/record-scanner/registrationResult.d.cts +9 -0
- package/dist/mainnet/models/record-scanner/revokeResult.d.cts +17 -0
- package/dist/mainnet/models/record-scanner/serialNumbersResult.d.cts +15 -0
- package/dist/mainnet/models/record-scanner/statusResponse.d.cts +13 -0
- package/dist/mainnet/models/record-scanner/statusResult.d.cts +13 -0
- package/dist/mainnet/models/record-scanner/tagsResult.d.cts +12 -0
- package/dist/mainnet/models/request.d.cts +14 -0
- package/dist/mainnet/models/request.d.ts +1 -1
- package/dist/mainnet/models/solution.d.cts +14 -0
- package/dist/mainnet/models/transaction/transactionJSON.d.cts +11 -0
- package/dist/mainnet/models/transaction/transactionObject.d.cts +14 -0
- package/dist/mainnet/models/transition/transitionJSON.d.cts +13 -0
- package/dist/mainnet/models/transition/transitionObject.d.cts +15 -0
- package/dist/mainnet/network-client.d.cts +850 -0
- package/dist/mainnet/network-client.d.ts +3 -0
- package/dist/mainnet/node-polyfill.cjs +238 -0
- package/dist/mainnet/node-polyfill.cjs.map +1 -0
- package/dist/mainnet/node-polyfill.d.cts +5 -0
- package/dist/mainnet/node-polyfill.js +1 -1
- package/dist/mainnet/node-polyfill.js.map +1 -1
- package/dist/mainnet/node.cjs +685 -0
- package/dist/mainnet/node.cjs.map +1 -0
- package/dist/mainnet/node.d.cts +3 -0
- package/dist/mainnet/node.js +1 -1
- package/dist/mainnet/polyfill/crypto.d.cts +1 -0
- package/dist/mainnet/polyfill/fetch.d.cts +1 -0
- package/dist/mainnet/polyfill/shared.d.cts +1 -0
- package/dist/mainnet/polyfill/worker.d.cts +1 -0
- package/dist/mainnet/polyfill/xmlhttprequest.d.cts +1 -0
- package/dist/mainnet/program-manager.d.cts +1588 -0
- package/dist/mainnet/record-provider.d.cts +274 -0
- package/dist/mainnet/record-scanner.d.cts +371 -0
- package/dist/mainnet/record-scanner.d.ts +9 -6
- package/dist/mainnet/security.d.cts +62 -0
- package/dist/mainnet/security.d.ts +5 -5
- package/dist/mainnet/utils.d.cts +23 -0
- package/dist/mainnet/utils.d.ts +10 -2
- package/dist/mainnet/wasm.d.cts +1 -0
- package/dist/testnet/account.d.cts +347 -0
- package/dist/testnet/browser.cjs +8507 -0
- package/dist/testnet/browser.cjs.map +1 -0
- package/dist/testnet/browser.d.cts +72 -0
- package/dist/testnet/browser.d.ts +2 -2
- package/dist/testnet/browser.js +55 -31
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/constants.d.cts +40 -0
- package/dist/testnet/external-signing.d.cts +76 -0
- package/dist/testnet/integrations/sealance/merkle-tree.d.cts +192 -0
- package/dist/testnet/keys/keystore/error.d.cts +24 -0
- package/dist/testnet/keys/keystore/file.d.cts +177 -0
- package/dist/testnet/keys/keystore/interface.d.cts +161 -0
- package/dist/testnet/keys/provider/interface.d.cts +170 -0
- package/dist/testnet/keys/provider/memory.d.cts +213 -0
- package/dist/testnet/keys/provider/memory.d.ts +6 -2
- package/dist/testnet/keys/provider/offline.d.cts +365 -0
- package/dist/testnet/keys/verifier/interface.d.cts +70 -0
- package/dist/testnet/keys/verifier/memory.d.cts +37 -0
- package/dist/testnet/keys/verifier/memory.d.ts +1 -1
- package/dist/testnet/models/authorization.d.cts +6 -0
- package/dist/testnet/models/authorization.d.ts +2 -2
- package/dist/testnet/models/blockJSON.d.cts +33 -0
- package/dist/testnet/models/confirmed_transaction.d.cts +9 -0
- package/dist/testnet/models/cryptoBoxPubkey.d.cts +4 -0
- package/dist/testnet/models/deployment/deploymentJSON.d.cts +6 -0
- package/dist/testnet/models/deployment/deploymentObject.d.cts +6 -0
- package/dist/testnet/models/encryptedProvingRequest.d.cts +4 -0
- package/dist/testnet/models/execution/executionJSON.d.cts +11 -0
- package/dist/testnet/models/execution/executionObject.d.cts +11 -0
- package/dist/testnet/models/external-signing.d.cts +123 -0
- package/dist/testnet/models/finalizeJSON.d.cts +6 -0
- package/dist/testnet/models/functionInput.d.cts +7 -0
- package/dist/testnet/models/functionObject.d.cts +8 -0
- package/dist/testnet/models/imports.d.cts +7 -0
- package/dist/testnet/models/input/inputJSON.d.cts +10 -0
- package/dist/testnet/models/input/inputObject.d.cts +15 -0
- package/dist/testnet/models/inputID.d.cts +4 -0
- package/dist/testnet/models/keyPair.d.cts +4 -0
- package/dist/testnet/models/output/outputJSON.d.cts +7 -0
- package/dist/testnet/models/output/outputObject.d.cts +18 -0
- package/dist/testnet/models/owner/ownerJSON.d.cts +4 -0
- package/dist/testnet/models/owner/ownerObject.d.cts +5 -0
- package/dist/testnet/models/plaintext/array.d.cts +3 -0
- package/dist/testnet/models/plaintext/literal.d.cts +1 -0
- package/dist/testnet/models/plaintext/plaintext.d.cts +5 -0
- package/dist/testnet/models/plaintext/struct.d.cts +5 -0
- package/dist/testnet/models/provingRequest.d.cts +6 -0
- package/dist/testnet/models/provingRequest.d.ts +1 -1
- package/dist/testnet/models/provingResponse.d.cts +51 -0
- package/dist/testnet/models/ratification.d.cts +4 -0
- package/dist/testnet/models/record-provider/encryptedRecord.d.cts +58 -0
- package/dist/testnet/models/record-provider/ownedRecord.d.cts +60 -0
- package/dist/testnet/models/record-provider/recordSearchParams.d.cts +19 -0
- package/dist/testnet/models/record-scanner/encryptedRecordsResult.d.cts +7 -0
- package/dist/testnet/models/record-scanner/encryptedRegistrationRequest.d.cts +8 -0
- package/dist/testnet/models/record-scanner/error.d.cts +47 -0
- package/dist/testnet/models/record-scanner/error.d.ts +1 -1
- package/dist/testnet/models/record-scanner/ownedFilter.d.cts +22 -0
- package/dist/testnet/models/record-scanner/ownedFilter.d.ts +3 -3
- package/dist/testnet/models/record-scanner/ownedRecordsResponseFilter.d.cts +42 -0
- package/dist/testnet/models/record-scanner/ownedRecordsResult.d.cts +13 -0
- package/dist/testnet/models/record-scanner/recordsFilter.d.cts +35 -0
- package/dist/testnet/models/record-scanner/recordsFilter.d.ts +2 -2
- package/dist/testnet/models/record-scanner/recordsResponseFilter.d.cts +42 -0
- package/dist/testnet/models/record-scanner/registrationRequest.d.cts +13 -0
- package/dist/testnet/models/record-scanner/registrationResponse.d.cts +13 -0
- package/dist/testnet/models/record-scanner/registrationResult.d.cts +9 -0
- package/dist/testnet/models/record-scanner/revokeResult.d.cts +17 -0
- package/dist/testnet/models/record-scanner/serialNumbersResult.d.cts +15 -0
- package/dist/testnet/models/record-scanner/statusResponse.d.cts +13 -0
- package/dist/testnet/models/record-scanner/statusResult.d.cts +13 -0
- package/dist/testnet/models/record-scanner/tagsResult.d.cts +12 -0
- package/dist/testnet/models/request.d.cts +14 -0
- package/dist/testnet/models/request.d.ts +1 -1
- package/dist/testnet/models/solution.d.cts +14 -0
- package/dist/testnet/models/transaction/transactionJSON.d.cts +11 -0
- package/dist/testnet/models/transaction/transactionObject.d.cts +14 -0
- package/dist/testnet/models/transition/transitionJSON.d.cts +13 -0
- package/dist/testnet/models/transition/transitionObject.d.cts +15 -0
- package/dist/testnet/network-client.d.cts +850 -0
- package/dist/testnet/network-client.d.ts +3 -0
- package/dist/testnet/node-polyfill.cjs +238 -0
- package/dist/testnet/node-polyfill.cjs.map +1 -0
- package/dist/testnet/node-polyfill.d.cts +5 -0
- package/dist/testnet/node-polyfill.js +1 -1
- package/dist/testnet/node-polyfill.js.map +1 -1
- package/dist/testnet/node.cjs +685 -0
- package/dist/testnet/node.cjs.map +1 -0
- package/dist/testnet/node.d.cts +3 -0
- package/dist/testnet/node.js +1 -1
- package/dist/testnet/polyfill/crypto.d.cts +1 -0
- package/dist/testnet/polyfill/fetch.d.cts +1 -0
- package/dist/testnet/polyfill/shared.d.cts +1 -0
- package/dist/testnet/polyfill/worker.d.cts +1 -0
- package/dist/testnet/polyfill/xmlhttprequest.d.cts +1 -0
- package/dist/testnet/program-manager.d.cts +1588 -0
- package/dist/testnet/record-provider.d.cts +274 -0
- package/dist/testnet/record-scanner.d.cts +371 -0
- package/dist/testnet/record-scanner.d.ts +9 -6
- package/dist/testnet/security.d.cts +62 -0
- package/dist/testnet/security.d.ts +5 -5
- package/dist/testnet/utils.d.cts +23 -0
- package/dist/testnet/utils.d.ts +10 -2
- package/dist/testnet/wasm.d.cts +1 -0
- package/package.json +51 -9
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RecordSearchParams } from "../record-provider/recordSearchParams.js";
|
|
2
|
+
import { RecordsResponseFilter } from "./recordsResponseFilter.js";
|
|
3
|
+
/**
|
|
4
|
+
* RecordsFilter is an extension of RecordSearchParams that represents a filter for scanning encrypted or owned records.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const recordsFilter: RecordsFilter = {
|
|
8
|
+
* start: 0,
|
|
9
|
+
* end: 100,
|
|
10
|
+
* programs: ["credits.aleo"],
|
|
11
|
+
* records: ["credits"],
|
|
12
|
+
* functions: ["transfer_public_to_private"],
|
|
13
|
+
* response: {
|
|
14
|
+
* program: true,
|
|
15
|
+
* record: true,
|
|
16
|
+
* function: true,
|
|
17
|
+
* transition: true,
|
|
18
|
+
* block_height: true,
|
|
19
|
+
* transaction_id: true,
|
|
20
|
+
* }
|
|
21
|
+
* results_per_page: 100,
|
|
22
|
+
* page: 0,
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface RecordsFilter extends RecordSearchParams {
|
|
26
|
+
commitments?: string[];
|
|
27
|
+
response?: RecordsResponseFilter;
|
|
28
|
+
start?: number;
|
|
29
|
+
end?: number;
|
|
30
|
+
programs?: string[];
|
|
31
|
+
records?: string[];
|
|
32
|
+
functions?: string[];
|
|
33
|
+
results_per_page?: number;
|
|
34
|
+
page?: number;
|
|
35
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RecordSearchParams } from "../record-provider/recordSearchParams";
|
|
2
|
-
import { RecordsResponseFilter } from "./recordsResponseFilter";
|
|
1
|
+
import { RecordSearchParams } from "../record-provider/recordSearchParams.js";
|
|
2
|
+
import { RecordsResponseFilter } from "./recordsResponseFilter.js";
|
|
3
3
|
/**
|
|
4
4
|
* RecordsFilter is an extension of RecordSearchParams that represents a filter for scanning encrypted or owned records.
|
|
5
5
|
*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RecordsResponseFilter is a type that represents a filter for the response from a record provider.
|
|
3
|
+
* A `true` value for a field in the filter will include that field in the response.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const recordsResponseFilter: RecordsResponseFilter = {
|
|
7
|
+
* block_height: true,
|
|
8
|
+
* block_timestamp: true,
|
|
9
|
+
* checksum: true,
|
|
10
|
+
* commitment: true,
|
|
11
|
+
* record_ciphertext: true,
|
|
12
|
+
* function_name: true,
|
|
13
|
+
* nonce: true,
|
|
14
|
+
* output_index: true,
|
|
15
|
+
* owner: true,
|
|
16
|
+
* program_name: true,
|
|
17
|
+
* record_name: true,
|
|
18
|
+
* sender_ciphertext: true,
|
|
19
|
+
* transaction_id: true,
|
|
20
|
+
* transition_id: true,
|
|
21
|
+
* transaction_index: true,
|
|
22
|
+
* transition_index: true,
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export type RecordsResponseFilter = {
|
|
26
|
+
block_height?: boolean;
|
|
27
|
+
block_timestamp?: boolean;
|
|
28
|
+
checksum?: boolean;
|
|
29
|
+
commitment?: boolean;
|
|
30
|
+
record_ciphertext?: boolean;
|
|
31
|
+
sender_ciphertext?: boolean;
|
|
32
|
+
function_name?: boolean;
|
|
33
|
+
nonce?: boolean;
|
|
34
|
+
output_index?: boolean;
|
|
35
|
+
owner?: boolean;
|
|
36
|
+
program_name?: boolean;
|
|
37
|
+
record_name?: boolean;
|
|
38
|
+
transaction_id?: boolean;
|
|
39
|
+
transition_id?: boolean;
|
|
40
|
+
transaction_index?: boolean;
|
|
41
|
+
transition_index?: boolean;
|
|
42
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RegistrationRequest is a type that represents a request to register an account's view key with a record scanning service.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const registrationRequest: RegistrationRequest = {
|
|
6
|
+
* view_key: "AViewKey1ccEt8A2Ryva5rxnKcAbn7wgTaTsb79tzkKHFpeKsm9NX",
|
|
7
|
+
* start: 123456,
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export type RegistrationRequest = {
|
|
11
|
+
view_key: string;
|
|
12
|
+
start: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RegistrationResponse is a type that represents a response from a record scanning service's registration endpoint.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const registrationResponse: RegistrationResponse = {
|
|
6
|
+
* uuid: "5291249998620209321712738612705518874926462927543783711572375085855029172391field",
|
|
7
|
+
* status: "pending",
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface RegistrationResponse {
|
|
11
|
+
uuid: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RecordScannerFailure } from "./error.js";
|
|
2
|
+
import type { RegistrationResponse } from "./registrationResponse.js";
|
|
3
|
+
/** Success variant of registration result. */
|
|
4
|
+
export interface RegisterSuccess {
|
|
5
|
+
ok: true;
|
|
6
|
+
data: RegistrationResponse;
|
|
7
|
+
}
|
|
8
|
+
/** Result of register() and registerEncrypted(); never throws on HTTP error. */
|
|
9
|
+
export type RegisterResult = RegisterSuccess | RecordScannerFailure;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RecordScannerFailure } from "./error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response from the record scanning service's revoke endpoint on success.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const revokeResponse: RevokeResponse = { status: "OK" };
|
|
7
|
+
*/
|
|
8
|
+
export interface RevokeResponse {
|
|
9
|
+
status: string;
|
|
10
|
+
}
|
|
11
|
+
/** Success variant of revoke result. */
|
|
12
|
+
export interface RevokeSuccess {
|
|
13
|
+
ok: true;
|
|
14
|
+
data: RevokeResponse;
|
|
15
|
+
}
|
|
16
|
+
/** Result of revoke(); never throws on HTTP error. */
|
|
17
|
+
export type RevokeResult = RevokeSuccess | RecordScannerFailure;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RecordScannerFailure } from "./error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Success variant of serialNumbers() result.
|
|
4
|
+
*
|
|
5
|
+
* @property ok - Whether the request was successful, always true for this interface.
|
|
6
|
+
* @property data - A map of serial numbers to whether they are owned by the account.
|
|
7
|
+
*/
|
|
8
|
+
export interface SerialNumbersSuccess {
|
|
9
|
+
ok: true;
|
|
10
|
+
data: Record<string, boolean>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Success or failure variant of serialNumbers() result.
|
|
14
|
+
*/
|
|
15
|
+
export type SerialNumbersResult = SerialNumbersSuccess | RecordScannerFailure;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusResponse is a type that represents a response from a record scanning service's status endpoint.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const statusResponse: StatusResponse = {
|
|
6
|
+
* synced: true,
|
|
7
|
+
* percentage: 100,
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface StatusResponse {
|
|
11
|
+
synced: boolean;
|
|
12
|
+
percentage: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RecordScannerFailure } from "./error.js";
|
|
2
|
+
import type { StatusResponse } from "./statusResponse.js";
|
|
3
|
+
/**
|
|
4
|
+
* Success variant of status() result.
|
|
5
|
+
*
|
|
6
|
+
* @property ok - Whether the request was successful, always true for this interface variant.
|
|
7
|
+
* @property data - StatusResponse returned by the server.
|
|
8
|
+
*/
|
|
9
|
+
export interface StatusSuccess {
|
|
10
|
+
ok: true;
|
|
11
|
+
data: StatusResponse;
|
|
12
|
+
}
|
|
13
|
+
export type StatusResult = StatusSuccess | RecordScannerFailure;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RecordScannerFailure } from "./error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Success variant of tags() result.
|
|
4
|
+
*
|
|
5
|
+
* @property ok - Whether the request was successful, always true for this interface variant.
|
|
6
|
+
* @property data - A map of tags to whether they are owned by the account.
|
|
7
|
+
*/
|
|
8
|
+
export interface TagsSuccess {
|
|
9
|
+
ok: true;
|
|
10
|
+
data: Record<string, boolean>;
|
|
11
|
+
}
|
|
12
|
+
export type TagsResult = TagsSuccess | RecordScannerFailure;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputID } from "./inputID.js";
|
|
2
|
+
export interface RequestJSON {
|
|
3
|
+
signer: string;
|
|
4
|
+
network: string;
|
|
5
|
+
program: string;
|
|
6
|
+
method: string;
|
|
7
|
+
input_ids: InputID[];
|
|
8
|
+
inputs: string[];
|
|
9
|
+
signature: string;
|
|
10
|
+
sk_tag: string;
|
|
11
|
+
tvk: string;
|
|
12
|
+
tcm: string;
|
|
13
|
+
scm: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SolutionsJSON {
|
|
2
|
+
version: BigInt;
|
|
3
|
+
solutions?: SolutionJSON[];
|
|
4
|
+
}
|
|
5
|
+
export interface SolutionJSON {
|
|
6
|
+
partial_solution: PartialSolutionJSON;
|
|
7
|
+
target: BigInt;
|
|
8
|
+
}
|
|
9
|
+
export interface PartialSolutionJSON {
|
|
10
|
+
solution_id: string;
|
|
11
|
+
epoch_hash: string;
|
|
12
|
+
address: string;
|
|
13
|
+
counter: BigInt;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DeploymentJSON } from "../deployment/deploymentJSON.js";
|
|
2
|
+
import { ExecutionJSON, FeeExecutionJSON } from "../execution/executionJSON.js";
|
|
3
|
+
import { OwnerJSON } from "../owner/ownerJSON.js";
|
|
4
|
+
export interface TransactionJSON {
|
|
5
|
+
type: string;
|
|
6
|
+
id: string;
|
|
7
|
+
deployment?: DeploymentJSON;
|
|
8
|
+
execution?: ExecutionJSON;
|
|
9
|
+
fee: FeeExecutionJSON;
|
|
10
|
+
owner?: OwnerJSON;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeploymentObject } from "../deployment/deploymentObject.js";
|
|
2
|
+
import { ExecutionObject, FeeExecutionObject } from "../execution/executionObject.js";
|
|
3
|
+
import { OwnerObject } from "../owner/ownerObject.js";
|
|
4
|
+
export interface TransactionObject {
|
|
5
|
+
type: string;
|
|
6
|
+
id: string;
|
|
7
|
+
execution?: ExecutionObject;
|
|
8
|
+
deployment?: DeploymentObject;
|
|
9
|
+
fee: FeeExecutionObject;
|
|
10
|
+
owner?: OwnerObject;
|
|
11
|
+
feeAmount?: bigint;
|
|
12
|
+
baseFee?: bigint;
|
|
13
|
+
priorityFee?: bigint;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InputJSON } from "../input/inputJSON.js";
|
|
2
|
+
import { OutputJSON } from "../output/outputJSON.js";
|
|
3
|
+
export interface TransitionJSON {
|
|
4
|
+
id: string;
|
|
5
|
+
program: string;
|
|
6
|
+
function: string;
|
|
7
|
+
inputs?: (InputJSON)[];
|
|
8
|
+
outputs?: (OutputJSON)[];
|
|
9
|
+
proof: string;
|
|
10
|
+
tpk: string;
|
|
11
|
+
tcm: string;
|
|
12
|
+
fee: bigint;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputObject } from "../input/inputObject.js";
|
|
2
|
+
import { OutputObject } from "../output/outputObject.js";
|
|
3
|
+
import { Field, Group } from "../../wasm.js";
|
|
4
|
+
export interface TransitionObject {
|
|
5
|
+
id: string;
|
|
6
|
+
program: string;
|
|
7
|
+
function: string;
|
|
8
|
+
inputs?: (InputObject)[];
|
|
9
|
+
outputs?: (OutputObject)[];
|
|
10
|
+
proof: string;
|
|
11
|
+
tpk: string | Group;
|
|
12
|
+
tcm: string | Field;
|
|
13
|
+
scm: string | Field;
|
|
14
|
+
fee: bigint;
|
|
15
|
+
}
|