@invisi-labs/protocol 1.1.2 → 1.1.4
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.cjs +203 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -21
- package/dist/index.d.ts +29 -21
- package/dist/index.js +196 -100
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as _invisi_labs_core from '@invisi-labs/core';
|
|
2
|
+
import { Hex, Address, ReceivingKeyLookup, PublicWallet, CreditDeliveryState, AuthorizedStatement, Note } from '@invisi-labs/core';
|
|
3
|
+
import { ContractRunner, Provider } from 'ethers';
|
|
3
4
|
import { DeploymentContext, CanonicalBlock, ProtocolDeployment, ProtocolRpcClient } from '@invisi-labs/rpc';
|
|
4
5
|
export { CanonicalBlock, DeploymentContext, Membership, ProtocolDataProvider, ProtocolDataStatus, ProtocolUpdateRange, ProtocolUpdates } from '@invisi-labs/rpc';
|
|
5
6
|
import { F as FundingParams, D as Delivery, I as InputSource, C as CreateCreditParams, a as CancelCreditParams, b as CreditDrawParams, T as TopUpCreditParams, c as TransactRequest, S as ShieldParams, d as ShieldOutput, e as CrossTreeTransactParams } from './types-BCTQjKzw.cjs';
|
|
@@ -67,6 +68,8 @@ declare function createRegistryReceivingKeyLookup(client: RegistryReadClient, re
|
|
|
67
68
|
interface TransactionContext extends DeploymentContext {
|
|
68
69
|
tokenAddress: Address;
|
|
69
70
|
now?: bigint;
|
|
71
|
+
/** Explicit chain timestamp used to bind Credit draw UTC periods. */
|
|
72
|
+
timestamp?: bigint;
|
|
70
73
|
}
|
|
71
74
|
declare const FIELD_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
|
|
72
75
|
declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000";
|
|
@@ -93,6 +96,8 @@ declare function normalizeContext(c: TransactionContext): {
|
|
|
93
96
|
protocolAddress: Hex;
|
|
94
97
|
tokenAddress: Hex;
|
|
95
98
|
now?: bigint;
|
|
99
|
+
/** Explicit chain timestamp used to bind Credit draw UTC periods. */
|
|
100
|
+
timestamp?: bigint;
|
|
96
101
|
};
|
|
97
102
|
declare function checkDeadline(c: TransactionContext, value: bigint): bigint;
|
|
98
103
|
declare function normalizeSources(sources: readonly InputSource[], inputCount: number, capacity: number): {
|
|
@@ -100,8 +105,8 @@ declare function normalizeSources(sources: readonly InputSource[], inputCount: n
|
|
|
100
105
|
merkleRoot: `0x${string}`;
|
|
101
106
|
}[];
|
|
102
107
|
declare const pad: (v: readonly bigint[], n: number) => bigint[];
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
/** Receipt/transport validation must not reject unrelated future wallet codecs. */
|
|
109
|
+
declare function normalizeOpaqueDelivery(value: Delivery, options?: {
|
|
105
110
|
empty?: boolean;
|
|
106
111
|
}): Delivery;
|
|
107
112
|
declare const deliveriesHash: (v: readonly Delivery[]) => Hex;
|
|
@@ -178,9 +183,8 @@ interface RegistryReader extends Pick<ChainReader, "getChainId" | "getCode" | "g
|
|
|
178
183
|
getRegistryNonce(context: RegistryContext, walletIdentity: Hex, block: CanonicalBlock): Promise<bigint>;
|
|
179
184
|
}
|
|
180
185
|
interface RegistrationPreparation {
|
|
181
|
-
wallet:
|
|
186
|
+
wallet: PublicWallet;
|
|
182
187
|
reader: RegistryReader;
|
|
183
|
-
signer?: Signer;
|
|
184
188
|
deadline?: bigint;
|
|
185
189
|
update?: boolean;
|
|
186
190
|
}
|
|
@@ -202,10 +206,13 @@ declare class RegistrationOperation {
|
|
|
202
206
|
chainId: bigint;
|
|
203
207
|
registryAddress: `0x${string}`;
|
|
204
208
|
};
|
|
205
|
-
/**
|
|
206
|
-
|
|
209
|
+
/** Export portable EIP-712 data for external signing. */
|
|
210
|
+
exportRegistrationAuthorization(options?: {
|
|
211
|
+
signal?: AbortSignal;
|
|
212
|
+
}): Promise<_invisi_labs_core.SigningRequest>;
|
|
213
|
+
/** Validate and attach an independently obtained EOA or ERC-1271 signature. */
|
|
214
|
+
withSignature(signature: string, options?: {
|
|
207
215
|
signal?: AbortSignal;
|
|
208
|
-
signature?: Hex;
|
|
209
216
|
}): Promise<RegistrationOperation>;
|
|
210
217
|
/** Empty signatures require the transaction sender to be the wallet owner. */
|
|
211
218
|
authorizeDirect(): Promise<RegistrationOperation>;
|
|
@@ -307,6 +314,7 @@ declare function validateCreateCreditRequest(c: TransactionContext, p: CreateCre
|
|
|
307
314
|
protocolAddress: Hex;
|
|
308
315
|
tokenAddress: Hex;
|
|
309
316
|
now?: bigint;
|
|
317
|
+
timestamp?: bigint;
|
|
310
318
|
};
|
|
311
319
|
declare function createCreditBaseInputs(c: TransactionContext, p: CreateCreditParams, cs: readonly Delivery[], f?: FundingInput): `0x${string}`[];
|
|
312
320
|
declare function createCreditPublicInputs(c: TransactionContext, p: CreateCreditParams, deliveries: readonly Delivery[], funding?: FundingInput): `0x${string}`[];
|
|
@@ -408,10 +416,15 @@ declare function validateCreditDrawRequest(c: TransactionContext, p: CreditDrawP
|
|
|
408
416
|
publicInputCount: number;
|
|
409
417
|
totalBits: number;
|
|
410
418
|
};
|
|
419
|
+
periods: {
|
|
420
|
+
currentDay: bigint;
|
|
421
|
+
currentMonth: bigint;
|
|
422
|
+
};
|
|
411
423
|
chainId: bigint;
|
|
412
424
|
protocolAddress: Hex;
|
|
413
425
|
tokenAddress: Hex;
|
|
414
426
|
now?: bigint;
|
|
427
|
+
timestamp?: bigint;
|
|
415
428
|
};
|
|
416
429
|
declare function creditDrawBaseInputs(c: TransactionContext, p: CreditDrawParams, cs: readonly Delivery[]): `0x${string}`[];
|
|
417
430
|
declare function validateCancelCreditRequest(c: TransactionContext, p: CancelCreditParams): {
|
|
@@ -427,6 +440,7 @@ declare function validateCancelCreditRequest(c: TransactionContext, p: CancelCre
|
|
|
427
440
|
protocolAddress: Hex;
|
|
428
441
|
tokenAddress: Hex;
|
|
429
442
|
now?: bigint;
|
|
443
|
+
timestamp?: bigint;
|
|
430
444
|
};
|
|
431
445
|
declare function cancelCreditBaseInputs(c: TransactionContext, p: CancelCreditParams): `0x${string}`[];
|
|
432
446
|
declare function validateTopUpCreditRequest(c: TransactionContext, p: TopUpCreditParams, cs: readonly Delivery[], funding?: FundingInput): {
|
|
@@ -449,6 +463,7 @@ declare function validateTopUpCreditRequest(c: TransactionContext, p: TopUpCredi
|
|
|
449
463
|
protocolAddress: Hex;
|
|
450
464
|
tokenAddress: Hex;
|
|
451
465
|
now?: bigint;
|
|
466
|
+
timestamp?: bigint;
|
|
452
467
|
};
|
|
453
468
|
creditSource: {
|
|
454
469
|
treeId: bigint;
|
|
@@ -625,6 +640,7 @@ declare function normalizeTransactRequest(c: TransactionContext, p: TransactRequ
|
|
|
625
640
|
protocolAddress: Hex;
|
|
626
641
|
tokenAddress: Hex;
|
|
627
642
|
now?: bigint;
|
|
643
|
+
timestamp?: bigint;
|
|
628
644
|
};
|
|
629
645
|
declare function transactPublicInputs(c: TransactionContext, p: TransactRequestParams, cs: readonly Delivery[], f?: FundingInput): `0x${string}`[];
|
|
630
646
|
declare function encodeTransactTypedData(c: TransactionContext, p: TransactRequestParams, deliveries: readonly Delivery[], f?: FundingInput): {
|
|
@@ -892,7 +908,7 @@ interface VerifyNoteCommitmentParams {
|
|
|
892
908
|
chainId: bigint;
|
|
893
909
|
}
|
|
894
910
|
declare function verifyNoteCommitment(params: VerifyNoteCommitmentParams): Promise<boolean>;
|
|
895
|
-
interface VerifyCreditCommitmentParams {
|
|
911
|
+
interface VerifyCreditCommitmentParams extends Partial<_invisi_labs_core.CreditPolicy> {
|
|
896
912
|
chainId: bigint;
|
|
897
913
|
spenderWalletIdentity: `0x${string}`;
|
|
898
914
|
ownerWalletIdentity: `0x${string}`;
|
|
@@ -913,16 +929,6 @@ interface VerifyCreditCommitmentParams {
|
|
|
913
929
|
*/
|
|
914
930
|
declare function verifyCreditCommitment(params: VerifyCreditCommitmentParams): Promise<boolean>;
|
|
915
931
|
|
|
916
|
-
interface BuildWithdrawalCalldataParams extends Omit<BuildTransactCalldataParams, "deliveries"> {
|
|
917
|
-
sourceNotes: readonly Note[];
|
|
918
|
-
}
|
|
919
|
-
/** Prepare a full public withdrawal whose spending authority is already proven in the supplied proof. */
|
|
920
|
-
declare function buildWithdrawalCalldata(p: BuildWithdrawalCalldataParams): Promise<{
|
|
921
|
-
data: `0x${string}`;
|
|
922
|
-
capacity: 112 | 14 | 56 | 168;
|
|
923
|
-
approveAmount: bigint;
|
|
924
|
-
}>;
|
|
925
|
-
|
|
926
932
|
interface NoteMembership {
|
|
927
933
|
note: Note;
|
|
928
934
|
treeId: bigint;
|
|
@@ -951,6 +957,8 @@ interface CreateCreditWitnessParams {
|
|
|
951
957
|
authorization: AuthorizedStatement;
|
|
952
958
|
}
|
|
953
959
|
interface DrawCreditWitnessParams {
|
|
960
|
+
/** Explicit chain timestamp used to prepare this signed statement. */
|
|
961
|
+
timestamp: bigint;
|
|
954
962
|
params: CreditDrawParams;
|
|
955
963
|
deliveries: readonly Delivery[];
|
|
956
964
|
inputs: readonly CreditMembership[];
|
|
@@ -991,4 +999,4 @@ declare class WitnessBuilder {
|
|
|
991
999
|
*/
|
|
992
1000
|
declare function resolveInstanceAddress(client: ContractRunner, factoryAddress: `0x${string}`, salt: `0x${string}`): Promise<`0x${string}`>;
|
|
993
1001
|
|
|
994
|
-
export { type AddressRegistration, AddressRegistry, type AddressRegistryOptions, type AggregateMemberInput, type BuildCancelCreditCalldataParams, type BuildCreateCreditCalldataParams, type BuildCreditDrawCalldataParams, type BuildShieldCalldataParams, type BuildTopUpCreditCalldataParams, type BuildTransactAggregateCalldataParams, type BuildTransactCalldataParams,
|
|
1002
|
+
export { type AddressRegistration, AddressRegistry, type AddressRegistryOptions, type AggregateMemberInput, type BuildCancelCreditCalldataParams, type BuildCreateCreditCalldataParams, type BuildCreditDrawCalldataParams, type BuildShieldCalldataParams, type BuildTopUpCreditCalldataParams, type BuildTransactAggregateCalldataParams, type BuildTransactCalldataParams, CREATE_CREDIT_FIELDS, CREDIT_DRAW_CAPACITIES, type CancelCreditWitnessParams, type CanonicalReceipt, type ChainReader, type CreateCreditWitnessParams, type CreditMembership, type DrawCreditWitnessParams, EMPTY_FUNDING, EMPTY_PERMIT, FIELD_MODULUS, type FactoryReader, type FundingInput, type NoteMembership, Protocol, type ProtocolLog, type ProtocolOptions, type RegistrationCalldata, RegistrationOperation, type RegistrationOptions, type RegistrationPreparation, type RegistrationStatus, type RegistryContext, type RegistryReadClient, type RegistryReader, type RegistryReceivingKeys, TRANSACT_CAPACITIES, TokenProtocol, type TokenProtocolOptions, type TopUpCreditWitnessParams, type TransactCapacity, type TransactRequestParams, type TransactWitnessParams, type TransactionCall, type TransactionContext, type VerifyCreditCommitmentParams, type VerifyNoteCommitmentParams, WitnessBuilder, ZERO_ADDRESS, ZERO_WORD, aggregateMemberRequestHash, aggregatePublicInputs, buildCancelCreditCalldata, buildCreateCreditCalldata, buildCreditDrawCalldata, buildRegistrationCalldata, buildShieldCalldata, buildTopUpCreditCalldata, buildTransactAggregateCalldata, buildTransactCalldata, cancelCreditBaseInputs, cancelCreditPublicInputs, cancelCreditRequestHash, checkDeadline, createCreditBaseInputs, createCreditPublicInputs, createCreditRequestHash, createRegistryReceivingKeyLookup, creditDrawBaseInputs, creditDrawPublicInputs, deliveriesHash, dense, encodeAggregateFundingTypedData, encodeCancelCreditTypedData, encodeCreateCreditFundingTypedData, encodeCreateCreditTypedData, encodeCreditDrawTypedData, encodeCreditProof, encodeShieldFundingTypedData, encodeTopUpCreditFundingTypedData, encodeTopUpCreditTypedData, encodeTransactFundingTypedData, encodeTransactTypedData, envelope, field, fundingFields, getEIP712Domain, known, normalizeContext, normalizeFunding, normalizeOpaqueDelivery, normalizeSources, normalizeTransactRequest, notes, pad, registrationDigest, registrationTypedData, resolveInstanceAddress, selectCreditDrawCircuit, selectTransactCapacity, shieldFundingRequestHash, topUpCreditBaseInputs, topUpCreditPublicInputs, topUpCreditRequestHash, transactFundingRequestHash, transactPublicInputs, transactUserPublicInputs, uint, validateCancelCreditRequest, validateCreateCreditRequest, validateCreditDrawRequest, validateFundingSubmission, validateShieldRequest, validateTopUpCreditRequest, verifyCreditCommitment, verifyNoteCommitment, word };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as _invisi_labs_core from '@invisi-labs/core';
|
|
2
|
+
import { Hex, Address, ReceivingKeyLookup, PublicWallet, CreditDeliveryState, AuthorizedStatement, Note } from '@invisi-labs/core';
|
|
3
|
+
import { ContractRunner, Provider } from 'ethers';
|
|
3
4
|
import { DeploymentContext, CanonicalBlock, ProtocolDeployment, ProtocolRpcClient } from '@invisi-labs/rpc';
|
|
4
5
|
export { CanonicalBlock, DeploymentContext, Membership, ProtocolDataProvider, ProtocolDataStatus, ProtocolUpdateRange, ProtocolUpdates } from '@invisi-labs/rpc';
|
|
5
6
|
import { F as FundingParams, D as Delivery, I as InputSource, C as CreateCreditParams, a as CancelCreditParams, b as CreditDrawParams, T as TopUpCreditParams, c as TransactRequest, S as ShieldParams, d as ShieldOutput, e as CrossTreeTransactParams } from './types-BCTQjKzw.js';
|
|
@@ -67,6 +68,8 @@ declare function createRegistryReceivingKeyLookup(client: RegistryReadClient, re
|
|
|
67
68
|
interface TransactionContext extends DeploymentContext {
|
|
68
69
|
tokenAddress: Address;
|
|
69
70
|
now?: bigint;
|
|
71
|
+
/** Explicit chain timestamp used to bind Credit draw UTC periods. */
|
|
72
|
+
timestamp?: bigint;
|
|
70
73
|
}
|
|
71
74
|
declare const FIELD_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
|
|
72
75
|
declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000";
|
|
@@ -93,6 +96,8 @@ declare function normalizeContext(c: TransactionContext): {
|
|
|
93
96
|
protocolAddress: Hex;
|
|
94
97
|
tokenAddress: Hex;
|
|
95
98
|
now?: bigint;
|
|
99
|
+
/** Explicit chain timestamp used to bind Credit draw UTC periods. */
|
|
100
|
+
timestamp?: bigint;
|
|
96
101
|
};
|
|
97
102
|
declare function checkDeadline(c: TransactionContext, value: bigint): bigint;
|
|
98
103
|
declare function normalizeSources(sources: readonly InputSource[], inputCount: number, capacity: number): {
|
|
@@ -100,8 +105,8 @@ declare function normalizeSources(sources: readonly InputSource[], inputCount: n
|
|
|
100
105
|
merkleRoot: `0x${string}`;
|
|
101
106
|
}[];
|
|
102
107
|
declare const pad: (v: readonly bigint[], n: number) => bigint[];
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
/** Receipt/transport validation must not reject unrelated future wallet codecs. */
|
|
109
|
+
declare function normalizeOpaqueDelivery(value: Delivery, options?: {
|
|
105
110
|
empty?: boolean;
|
|
106
111
|
}): Delivery;
|
|
107
112
|
declare const deliveriesHash: (v: readonly Delivery[]) => Hex;
|
|
@@ -178,9 +183,8 @@ interface RegistryReader extends Pick<ChainReader, "getChainId" | "getCode" | "g
|
|
|
178
183
|
getRegistryNonce(context: RegistryContext, walletIdentity: Hex, block: CanonicalBlock): Promise<bigint>;
|
|
179
184
|
}
|
|
180
185
|
interface RegistrationPreparation {
|
|
181
|
-
wallet:
|
|
186
|
+
wallet: PublicWallet;
|
|
182
187
|
reader: RegistryReader;
|
|
183
|
-
signer?: Signer;
|
|
184
188
|
deadline?: bigint;
|
|
185
189
|
update?: boolean;
|
|
186
190
|
}
|
|
@@ -202,10 +206,13 @@ declare class RegistrationOperation {
|
|
|
202
206
|
chainId: bigint;
|
|
203
207
|
registryAddress: `0x${string}`;
|
|
204
208
|
};
|
|
205
|
-
/**
|
|
206
|
-
|
|
209
|
+
/** Export portable EIP-712 data for external signing. */
|
|
210
|
+
exportRegistrationAuthorization(options?: {
|
|
211
|
+
signal?: AbortSignal;
|
|
212
|
+
}): Promise<_invisi_labs_core.SigningRequest>;
|
|
213
|
+
/** Validate and attach an independently obtained EOA or ERC-1271 signature. */
|
|
214
|
+
withSignature(signature: string, options?: {
|
|
207
215
|
signal?: AbortSignal;
|
|
208
|
-
signature?: Hex;
|
|
209
216
|
}): Promise<RegistrationOperation>;
|
|
210
217
|
/** Empty signatures require the transaction sender to be the wallet owner. */
|
|
211
218
|
authorizeDirect(): Promise<RegistrationOperation>;
|
|
@@ -307,6 +314,7 @@ declare function validateCreateCreditRequest(c: TransactionContext, p: CreateCre
|
|
|
307
314
|
protocolAddress: Hex;
|
|
308
315
|
tokenAddress: Hex;
|
|
309
316
|
now?: bigint;
|
|
317
|
+
timestamp?: bigint;
|
|
310
318
|
};
|
|
311
319
|
declare function createCreditBaseInputs(c: TransactionContext, p: CreateCreditParams, cs: readonly Delivery[], f?: FundingInput): `0x${string}`[];
|
|
312
320
|
declare function createCreditPublicInputs(c: TransactionContext, p: CreateCreditParams, deliveries: readonly Delivery[], funding?: FundingInput): `0x${string}`[];
|
|
@@ -408,10 +416,15 @@ declare function validateCreditDrawRequest(c: TransactionContext, p: CreditDrawP
|
|
|
408
416
|
publicInputCount: number;
|
|
409
417
|
totalBits: number;
|
|
410
418
|
};
|
|
419
|
+
periods: {
|
|
420
|
+
currentDay: bigint;
|
|
421
|
+
currentMonth: bigint;
|
|
422
|
+
};
|
|
411
423
|
chainId: bigint;
|
|
412
424
|
protocolAddress: Hex;
|
|
413
425
|
tokenAddress: Hex;
|
|
414
426
|
now?: bigint;
|
|
427
|
+
timestamp?: bigint;
|
|
415
428
|
};
|
|
416
429
|
declare function creditDrawBaseInputs(c: TransactionContext, p: CreditDrawParams, cs: readonly Delivery[]): `0x${string}`[];
|
|
417
430
|
declare function validateCancelCreditRequest(c: TransactionContext, p: CancelCreditParams): {
|
|
@@ -427,6 +440,7 @@ declare function validateCancelCreditRequest(c: TransactionContext, p: CancelCre
|
|
|
427
440
|
protocolAddress: Hex;
|
|
428
441
|
tokenAddress: Hex;
|
|
429
442
|
now?: bigint;
|
|
443
|
+
timestamp?: bigint;
|
|
430
444
|
};
|
|
431
445
|
declare function cancelCreditBaseInputs(c: TransactionContext, p: CancelCreditParams): `0x${string}`[];
|
|
432
446
|
declare function validateTopUpCreditRequest(c: TransactionContext, p: TopUpCreditParams, cs: readonly Delivery[], funding?: FundingInput): {
|
|
@@ -449,6 +463,7 @@ declare function validateTopUpCreditRequest(c: TransactionContext, p: TopUpCredi
|
|
|
449
463
|
protocolAddress: Hex;
|
|
450
464
|
tokenAddress: Hex;
|
|
451
465
|
now?: bigint;
|
|
466
|
+
timestamp?: bigint;
|
|
452
467
|
};
|
|
453
468
|
creditSource: {
|
|
454
469
|
treeId: bigint;
|
|
@@ -625,6 +640,7 @@ declare function normalizeTransactRequest(c: TransactionContext, p: TransactRequ
|
|
|
625
640
|
protocolAddress: Hex;
|
|
626
641
|
tokenAddress: Hex;
|
|
627
642
|
now?: bigint;
|
|
643
|
+
timestamp?: bigint;
|
|
628
644
|
};
|
|
629
645
|
declare function transactPublicInputs(c: TransactionContext, p: TransactRequestParams, cs: readonly Delivery[], f?: FundingInput): `0x${string}`[];
|
|
630
646
|
declare function encodeTransactTypedData(c: TransactionContext, p: TransactRequestParams, deliveries: readonly Delivery[], f?: FundingInput): {
|
|
@@ -892,7 +908,7 @@ interface VerifyNoteCommitmentParams {
|
|
|
892
908
|
chainId: bigint;
|
|
893
909
|
}
|
|
894
910
|
declare function verifyNoteCommitment(params: VerifyNoteCommitmentParams): Promise<boolean>;
|
|
895
|
-
interface VerifyCreditCommitmentParams {
|
|
911
|
+
interface VerifyCreditCommitmentParams extends Partial<_invisi_labs_core.CreditPolicy> {
|
|
896
912
|
chainId: bigint;
|
|
897
913
|
spenderWalletIdentity: `0x${string}`;
|
|
898
914
|
ownerWalletIdentity: `0x${string}`;
|
|
@@ -913,16 +929,6 @@ interface VerifyCreditCommitmentParams {
|
|
|
913
929
|
*/
|
|
914
930
|
declare function verifyCreditCommitment(params: VerifyCreditCommitmentParams): Promise<boolean>;
|
|
915
931
|
|
|
916
|
-
interface BuildWithdrawalCalldataParams extends Omit<BuildTransactCalldataParams, "deliveries"> {
|
|
917
|
-
sourceNotes: readonly Note[];
|
|
918
|
-
}
|
|
919
|
-
/** Prepare a full public withdrawal whose spending authority is already proven in the supplied proof. */
|
|
920
|
-
declare function buildWithdrawalCalldata(p: BuildWithdrawalCalldataParams): Promise<{
|
|
921
|
-
data: `0x${string}`;
|
|
922
|
-
capacity: 112 | 14 | 56 | 168;
|
|
923
|
-
approveAmount: bigint;
|
|
924
|
-
}>;
|
|
925
|
-
|
|
926
932
|
interface NoteMembership {
|
|
927
933
|
note: Note;
|
|
928
934
|
treeId: bigint;
|
|
@@ -951,6 +957,8 @@ interface CreateCreditWitnessParams {
|
|
|
951
957
|
authorization: AuthorizedStatement;
|
|
952
958
|
}
|
|
953
959
|
interface DrawCreditWitnessParams {
|
|
960
|
+
/** Explicit chain timestamp used to prepare this signed statement. */
|
|
961
|
+
timestamp: bigint;
|
|
954
962
|
params: CreditDrawParams;
|
|
955
963
|
deliveries: readonly Delivery[];
|
|
956
964
|
inputs: readonly CreditMembership[];
|
|
@@ -991,4 +999,4 @@ declare class WitnessBuilder {
|
|
|
991
999
|
*/
|
|
992
1000
|
declare function resolveInstanceAddress(client: ContractRunner, factoryAddress: `0x${string}`, salt: `0x${string}`): Promise<`0x${string}`>;
|
|
993
1001
|
|
|
994
|
-
export { type AddressRegistration, AddressRegistry, type AddressRegistryOptions, type AggregateMemberInput, type BuildCancelCreditCalldataParams, type BuildCreateCreditCalldataParams, type BuildCreditDrawCalldataParams, type BuildShieldCalldataParams, type BuildTopUpCreditCalldataParams, type BuildTransactAggregateCalldataParams, type BuildTransactCalldataParams,
|
|
1002
|
+
export { type AddressRegistration, AddressRegistry, type AddressRegistryOptions, type AggregateMemberInput, type BuildCancelCreditCalldataParams, type BuildCreateCreditCalldataParams, type BuildCreditDrawCalldataParams, type BuildShieldCalldataParams, type BuildTopUpCreditCalldataParams, type BuildTransactAggregateCalldataParams, type BuildTransactCalldataParams, CREATE_CREDIT_FIELDS, CREDIT_DRAW_CAPACITIES, type CancelCreditWitnessParams, type CanonicalReceipt, type ChainReader, type CreateCreditWitnessParams, type CreditMembership, type DrawCreditWitnessParams, EMPTY_FUNDING, EMPTY_PERMIT, FIELD_MODULUS, type FactoryReader, type FundingInput, type NoteMembership, Protocol, type ProtocolLog, type ProtocolOptions, type RegistrationCalldata, RegistrationOperation, type RegistrationOptions, type RegistrationPreparation, type RegistrationStatus, type RegistryContext, type RegistryReadClient, type RegistryReader, type RegistryReceivingKeys, TRANSACT_CAPACITIES, TokenProtocol, type TokenProtocolOptions, type TopUpCreditWitnessParams, type TransactCapacity, type TransactRequestParams, type TransactWitnessParams, type TransactionCall, type TransactionContext, type VerifyCreditCommitmentParams, type VerifyNoteCommitmentParams, WitnessBuilder, ZERO_ADDRESS, ZERO_WORD, aggregateMemberRequestHash, aggregatePublicInputs, buildCancelCreditCalldata, buildCreateCreditCalldata, buildCreditDrawCalldata, buildRegistrationCalldata, buildShieldCalldata, buildTopUpCreditCalldata, buildTransactAggregateCalldata, buildTransactCalldata, cancelCreditBaseInputs, cancelCreditPublicInputs, cancelCreditRequestHash, checkDeadline, createCreditBaseInputs, createCreditPublicInputs, createCreditRequestHash, createRegistryReceivingKeyLookup, creditDrawBaseInputs, creditDrawPublicInputs, deliveriesHash, dense, encodeAggregateFundingTypedData, encodeCancelCreditTypedData, encodeCreateCreditFundingTypedData, encodeCreateCreditTypedData, encodeCreditDrawTypedData, encodeCreditProof, encodeShieldFundingTypedData, encodeTopUpCreditFundingTypedData, encodeTopUpCreditTypedData, encodeTransactFundingTypedData, encodeTransactTypedData, envelope, field, fundingFields, getEIP712Domain, known, normalizeContext, normalizeFunding, normalizeOpaqueDelivery, normalizeSources, normalizeTransactRequest, notes, pad, registrationDigest, registrationTypedData, resolveInstanceAddress, selectCreditDrawCircuit, selectTransactCapacity, shieldFundingRequestHash, topUpCreditBaseInputs, topUpCreditPublicInputs, topUpCreditRequestHash, transactFundingRequestHash, transactPublicInputs, transactUserPublicInputs, uint, validateCancelCreditRequest, validateCreateCreditRequest, validateCreditDrawRequest, validateFundingSubmission, validateShieldRequest, validateTopUpCreditRequest, verifyCreditCommitment, verifyNoteCommitment, word };
|