@t3foundry/tasra-sdk 0.0.0-stage → 0.3.0-next.1
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/CHANGELOG.md +148 -0
- package/LICENSE +202 -0
- package/NOTICE +94 -0
- package/README.md +137 -2
- package/SECURITY.md +115 -0
- package/dist/app/approvals.d.ts +50 -0
- package/dist/app/approvals.js +90 -0
- package/dist/app/authorization.d.ts +19 -0
- package/dist/app/authorization.js +20 -0
- package/dist/app/client.d.ts +231 -0
- package/dist/app/client.js +272 -0
- package/dist/app/creation.d.ts +73 -0
- package/dist/app/creation.js +77 -0
- package/dist/app/deployment.d.ts +36 -0
- package/dist/app/deployment.js +18 -0
- package/dist/app/identity.d.ts +211 -0
- package/dist/app/identity.js +287 -0
- package/dist/app/index.d.ts +22 -0
- package/dist/app/index.js +12 -0
- package/dist/app/manifest.d.ts +74 -0
- package/dist/app/manifest.js +120 -0
- package/dist/app/node.d.ts +30 -0
- package/dist/app/node.js +159 -0
- package/dist/app/ready-slot.d.ts +157 -0
- package/dist/app/ready-slot.js +199 -0
- package/dist/app/tasra-client.d.ts +125 -0
- package/dist/app/tasra-client.js +79 -0
- package/dist/app/viem.d.ts +10 -0
- package/dist/app/viem.js +32 -0
- package/dist/app/wallet.d.ts +126 -0
- package/dist/app/wallet.js +137 -0
- package/dist/auth/dpop.d.ts +86 -0
- package/dist/auth/dpop.js +142 -0
- package/dist/auth/holderProof.d.ts +102 -0
- package/dist/auth/holderProof.js +161 -0
- package/dist/auth/identityScope.d.ts +19 -0
- package/dist/auth/identityScope.js +82 -0
- package/dist/auth/index.d.ts +11 -0
- package/dist/auth/index.js +13 -0
- package/dist/auth/oid4vp.d.ts +230 -0
- package/dist/auth/oid4vp.js +780 -0
- package/dist/auth/rego/wasm/PINS.json +11 -0
- package/dist/auth/rego/wasm/keykeeper_rego_wasm.d.ts +76 -0
- package/dist/auth/rego/wasm/keykeeper_rego_wasm.js +379 -0
- package/dist/auth/rego/wasm/keykeeper_rego_wasm_bg.wasm +0 -0
- package/dist/auth/rego.d.ts +192 -0
- package/dist/auth/rego.js +492 -0
- package/dist/auth/verifier.d.ts +166 -0
- package/dist/auth/verifier.js +211 -0
- package/dist/chain/abis/accountantSetRegistry.d.ts +441 -0
- package/dist/chain/abis/accountantSetRegistry.js +574 -0
- package/dist/chain/abis/accountantSlashing.d.ts +2071 -0
- package/dist/chain/abis/accountantSlashing.js +2670 -0
- package/dist/chain/abis/bondingCurve.d.ts +398 -0
- package/dist/chain/abis/bondingCurve.js +521 -0
- package/dist/chain/abis/equivocationSlasher.d.ts +292 -0
- package/dist/chain/abis/equivocationSlasher.js +379 -0
- package/dist/chain/abis/fixedTasraPriceOracle.d.ts +52 -0
- package/dist/chain/abis/fixedTasraPriceOracle.js +72 -0
- package/dist/chain/abis/index.d.ts +12801 -0
- package/dist/chain/abis/index.js +64 -0
- package/dist/chain/abis/keeperShareRegistry.d.ts +519 -0
- package/dist/chain/abis/keeperShareRegistry.js +675 -0
- package/dist/chain/abis/keyRegistry.d.ts +2421 -0
- package/dist/chain/abis/keyRegistry.js +3114 -0
- package/dist/chain/abis/livenessRegistry.d.ts +402 -0
- package/dist/chain/abis/livenessRegistry.js +524 -0
- package/dist/chain/abis/mockEurc.d.ts +210 -0
- package/dist/chain/abis/mockEurc.js +276 -0
- package/dist/chain/abis/nodeRegistry.d.ts +1630 -0
- package/dist/chain/abis/nodeRegistry.js +2113 -0
- package/dist/chain/abis/platformExecutor.d.ts +328 -0
- package/dist/chain/abis/platformExecutor.js +429 -0
- package/dist/chain/abis/prevrandaoSaltBeacon.d.ts +16 -0
- package/dist/chain/abis/prevrandaoSaltBeacon.js +24 -0
- package/dist/chain/abis/serviceRegistry.d.ts +556 -0
- package/dist/chain/abis/serviceRegistry.js +719 -0
- package/dist/chain/abis/settlement.d.ts +1624 -0
- package/dist/chain/abis/settlement.js +2096 -0
- package/dist/chain/abis/tasraSwapRouter.d.ts +92 -0
- package/dist/chain/abis/tasraSwapRouter.js +122 -0
- package/dist/chain/abis/tasraToken.d.ts +455 -0
- package/dist/chain/abis/tasraToken.js +599 -0
- package/dist/chain/abis/tasraVestingVault.d.ts +165 -0
- package/dist/chain/abis/tasraVestingVault.js +215 -0
- package/dist/chain/abis/thresholdRandomBeacon.d.ts +378 -0
- package/dist/chain/abis/thresholdRandomBeacon.js +494 -0
- package/dist/chain/abis/treasury.d.ts +301 -0
- package/dist/chain/abis/treasury.js +390 -0
- package/dist/chain/abis/verifierSetRegistry.d.ts +445 -0
- package/dist/chain/abis/verifierSetRegistry.js +579 -0
- package/dist/chain/client.d.ts +212 -0
- package/dist/chain/client.js +576 -0
- package/dist/chain/commitmentRecovery.d.ts +21 -0
- package/dist/chain/commitmentRecovery.js +44 -0
- package/dist/chain/committeeClient.d.ts +102 -0
- package/dist/chain/committeeClient.js +137 -0
- package/dist/chain/deployments.d.ts +56 -0
- package/dist/chain/deployments.js +269 -0
- package/dist/chain/discovery.d.ts +49 -0
- package/dist/chain/discovery.js +107 -0
- package/dist/chain/events.d.ts +58 -0
- package/dist/chain/events.js +125 -0
- package/dist/chain/format.d.ts +25 -0
- package/dist/chain/format.js +51 -0
- package/dist/chain/index.d.ts +41 -0
- package/dist/chain/index.js +56 -0
- package/dist/chain/manifest.d.ts +165 -0
- package/dist/chain/manifest.js +132 -0
- package/dist/chain/network-profiles.json +75 -0
- package/dist/chain/networks.d.ts +73 -0
- package/dist/chain/networks.js +62 -0
- package/dist/chain/node.d.ts +44 -0
- package/dist/chain/node.js +176 -0
- package/dist/chain/offchain.d.ts +149 -0
- package/dist/chain/offchain.js +73 -0
- package/dist/chain/provisionRule.d.ts +164 -0
- package/dist/chain/provisionRule.js +212 -0
- package/dist/chain/registeredAgent.d.ts +64 -0
- package/dist/chain/registeredAgent.js +140 -0
- package/dist/chain/registeredOperation.d.ts +49 -0
- package/dist/chain/registeredOperation.js +136 -0
- package/dist/chain/registeredRelay.d.ts +206 -0
- package/dist/chain/registeredRelay.js +312 -0
- package/dist/chain/revertReason.d.ts +14 -0
- package/dist/chain/revertReason.js +62 -0
- package/dist/chain/ruleAmendment.d.ts +80 -0
- package/dist/chain/ruleAmendment.js +195 -0
- package/dist/chain/ruleAmendmentCore.d.ts +129 -0
- package/dist/chain/ruleAmendmentCore.js +152 -0
- package/dist/chain/ruleInput.d.ts +10 -0
- package/dist/chain/ruleInput.js +13 -0
- package/dist/chain/serviceIdentity.d.ts +176 -0
- package/dist/chain/serviceIdentity.js +237 -0
- package/dist/chain/serviceProfiles.d.ts +39 -0
- package/dist/chain/serviceProfiles.js +74 -0
- package/dist/chain/services.d.ts +141 -0
- package/dist/chain/services.js +79 -0
- package/dist/chain/slotClient.d.ts +55 -0
- package/dist/chain/slotClient.js +62 -0
- package/dist/chain/slotSeed.d.ts +31 -0
- package/dist/chain/slotSeed.js +98 -0
- package/dist/chain/write.d.ts +431 -0
- package/dist/chain/write.js +958 -0
- package/dist/client/client.d.ts +112 -0
- package/dist/client/client.js +111 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +2 -0
- package/dist/client/session.d.ts +67 -0
- package/dist/client/session.js +238 -0
- package/dist/committee/client.d.ts +284 -0
- package/dist/committee/client.js +351 -0
- package/dist/committee/dual-sign.d.ts +110 -0
- package/dist/committee/dual-sign.js +202 -0
- package/dist/committee/ecdsa.d.ts +36 -0
- package/dist/committee/ecdsa.js +45 -0
- package/dist/committee/extraction.d.ts +82 -0
- package/dist/committee/extraction.js +96 -0
- package/dist/committee/index.d.ts +19 -0
- package/dist/committee/index.js +13 -0
- package/dist/committee/oauth.d.ts +51 -0
- package/dist/committee/oauth.js +90 -0
- package/dist/committee/receipts.d.ts +51 -0
- package/dist/committee/receipts.js +59 -0
- package/dist/committee/request.d.ts +264 -0
- package/dist/committee/request.js +305 -0
- package/dist/committee/token.d.ts +274 -0
- package/dist/committee/token.js +418 -0
- package/dist/crypto/constants.d.ts +10 -0
- package/dist/crypto/constants.js +32 -0
- package/dist/crypto/detect.d.ts +20 -0
- package/dist/crypto/detect.js +44 -0
- package/dist/crypto/envelope.d.ts +60 -0
- package/dist/crypto/envelope.js +243 -0
- package/dist/crypto/frost.d.ts +49 -0
- package/dist/crypto/frost.js +152 -0
- package/dist/crypto/hex.d.ts +7 -0
- package/dist/crypto/hex.js +24 -0
- package/dist/crypto/ibe-blob.d.ts +114 -0
- package/dist/crypto/ibe-blob.js +208 -0
- package/dist/crypto/ibe.d.ts +88 -0
- package/dist/crypto/ibe.js +262 -0
- package/dist/crypto/index.d.ts +12 -0
- package/dist/crypto/index.js +12 -0
- package/dist/crypto/kem.d.ts +55 -0
- package/dist/crypto/kem.js +241 -0
- package/dist/decryption/client.d.ts +64 -0
- package/dist/decryption/client.js +82 -0
- package/dist/decryption/index.d.ts +2 -0
- package/dist/decryption/index.js +2 -0
- package/dist/errors.d.ts +124 -0
- package/dist/errors.js +167 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +98 -0
- package/dist/keys/index.d.ts +1 -0
- package/dist/keys/index.js +4 -0
- package/dist/keys/node-client.d.ts +27 -0
- package/dist/keys/node-client.js +97 -0
- package/dist/oid4vp/binding.d.ts +76 -0
- package/dist/oid4vp/binding.js +118 -0
- package/dist/oid4vp/did-web.d.ts +49 -0
- package/dist/oid4vp/did-web.js +57 -0
- package/dist/oid4vp/index.d.ts +9 -0
- package/dist/oid4vp/index.js +10 -0
- package/dist/oid4vp/jose.d.ts +166 -0
- package/dist/oid4vp/jose.js +242 -0
- package/dist/oid4vp/jwe.d.ts +30 -0
- package/dist/oid4vp/jwe.js +93 -0
- package/dist/oid4vp/oid4vci.d.ts +84 -0
- package/dist/oid4vp/oid4vci.js +85 -0
- package/dist/oid4vp/request-object.d.ts +109 -0
- package/dist/oid4vp/request-object.js +96 -0
- package/dist/oid4vp/sd-jwt.d.ts +177 -0
- package/dist/oid4vp/sd-jwt.js +208 -0
- package/dist/oid4vp/verifier-agent.d.ts +161 -0
- package/dist/oid4vp/verifier-agent.js +132 -0
- package/dist/oid4vp/wallet.d.ts +116 -0
- package/dist/oid4vp/wallet.js +108 -0
- package/dist/recipient/store.d.ts +67 -0
- package/dist/recipient/store.js +98 -0
- package/dist/signing/ecdsa.d.ts +49 -0
- package/dist/signing/ecdsa.js +79 -0
- package/dist/signing/frost.d.ts +88 -0
- package/dist/signing/frost.js +145 -0
- package/dist/signing/index.d.ts +4 -0
- package/dist/signing/index.js +3 -0
- package/dist/slots/faucet.d.ts +23 -0
- package/dist/slots/faucet.js +35 -0
- package/dist/slots/index.d.ts +2 -0
- package/dist/slots/index.js +4 -0
- package/dist/verifier-agent/index.d.ts +241 -0
- package/dist/verifier-agent/index.js +411 -0
- package/docs/DEVELOPER-EXPERIENCE.md +62 -0
- package/docs/README.md +33 -0
- package/docs/access-control.md +76 -0
- package/docs/ai-development.md +292 -0
- package/docs/api.md +338 -0
- package/docs/application-api.md +335 -0
- package/docs/architecture.md +65 -0
- package/docs/basics.md +48 -0
- package/docs/capabilities.md +86 -0
- package/docs/chain.md +153 -0
- package/docs/compatibility.md +36 -0
- package/docs/consumer-migrations.md +80 -0
- package/docs/create-slot.md +104 -0
- package/docs/document-signing.md +243 -0
- package/docs/encrypted-notes.md +129 -0
- package/docs/encryption.md +100 -0
- package/docs/errors.md +76 -0
- package/docs/flows.md +289 -0
- package/docs/fuji.md +127 -0
- package/docs/funding.md +126 -0
- package/docs/getting-started.md +94 -0
- package/docs/glossary.md +44 -0
- package/docs/installation.md +132 -0
- package/docs/manage-slot.md +95 -0
- package/docs/native-approvals.md +124 -0
- package/docs/prerequisites.md +137 -0
- package/docs/read-slot.md +41 -0
- package/docs/reference/README.md +30 -0
- package/docs/reference/app-node.md +102 -0
- package/docs/reference/app.md +1737 -0
- package/docs/reference/chain-node.md +159 -0
- package/docs/reference/chain.md +3609 -0
- package/docs/reference/committee.md +2176 -0
- package/docs/reference/main.md +4068 -0
- package/docs/reference/oid4vp.md +2547 -0
- package/docs/reference/verifier-agent.md +498 -0
- package/docs/shared-account.md +168 -0
- package/docs/signing-and-encryption.md +52 -0
- package/docs/signing.md +172 -0
- package/examples/committee-slot.ts +16 -0
- package/examples/connect-fuji.ts +41 -0
- package/examples/connect-network.ts +14 -0
- package/examples/credential-approvals.ts +46 -0
- package/examples/document-signing/README.md +59 -0
- package/examples/document-signing/backend.ts +132 -0
- package/examples/document-signing/build.mjs +19 -0
- package/examples/document-signing/config.ts +34 -0
- package/examples/document-signing/gitignore.template +9 -0
- package/examples/document-signing/model.ts +140 -0
- package/examples/document-signing/network.ts +58 -0
- package/examples/document-signing/package.json +25 -0
- package/examples/document-signing/public/index.html +27 -0
- package/examples/document-signing/public/sample.pdf +31 -0
- package/examples/document-signing/public/styles.css +531 -0
- package/examples/document-signing/server.ts +358 -0
- package/examples/document-signing/setup.ts +111 -0
- package/examples/document-signing/store.ts +105 -0
- package/examples/document-signing/tsconfig.json +24 -0
- package/examples/document-signing/verify.ts +24 -0
- package/examples/document-signing/web/app.ts +312 -0
- package/examples/document-signing/web/preview.ts +67 -0
- package/examples/document-signing/web/wallet.ts +146 -0
- package/examples/document-signing/workflow.test.ts +228 -0
- package/examples/document-signing/workflow.ts +241 -0
- package/examples/document-signing.ts +96 -0
- package/examples/encrypted-notes.ts +86 -0
- package/examples/ethers-signer.ts +204 -0
- package/examples/fund-slot.ts +73 -0
- package/examples/getting-started.ts +25 -0
- package/examples/learning-authorize.ts +23 -0
- package/examples/learning-cancel-slot.ts +11 -0
- package/examples/learning-context.ts +28 -0
- package/examples/learning-create-slot.ts +25 -0
- package/examples/learning-read-slot.ts +8 -0
- package/examples/learning-renew-slot.ts +12 -0
- package/examples/learning-sign.ts +8 -0
- package/examples/live-config.ts +71 -0
- package/examples/minimal.ts +6 -0
- package/examples/native-approvals.ts +57 -0
- package/examples/network.ts +58 -0
- package/examples/offline.ts +16 -0
- package/examples/personal-vault.ts +20 -0
- package/examples/provision-slot.ts +47 -0
- package/examples/shared-account.ts +46 -0
- package/examples/slot-address.ts +13 -0
- package/examples/slot-creation.ts +9 -0
- package/examples/tutorial-negative.ts +26 -0
- package/examples/tutorial-support.ts +76 -0
- package/examples/viem-account.ts +203 -0
- package/package.json +303 -4
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/** Treasury contract interface for treasury balances, authorized withdrawals and refunds. */
|
|
2
|
+
export declare const treasuryAbi: readonly [{
|
|
3
|
+
readonly type: "constructor";
|
|
4
|
+
readonly inputs: readonly [{
|
|
5
|
+
readonly name: "token_";
|
|
6
|
+
readonly type: "address";
|
|
7
|
+
readonly internalType: "contract TasraToken";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "owner_";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
readonly internalType: "address";
|
|
12
|
+
}];
|
|
13
|
+
readonly stateMutability: "nonpayable";
|
|
14
|
+
}, {
|
|
15
|
+
readonly type: "function";
|
|
16
|
+
readonly name: "acceptOwnership";
|
|
17
|
+
readonly inputs: readonly [];
|
|
18
|
+
readonly outputs: readonly [];
|
|
19
|
+
readonly stateMutability: "nonpayable";
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly name: "balance";
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
readonly internalType: "uint256";
|
|
28
|
+
}];
|
|
29
|
+
readonly stateMutability: "view";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "function";
|
|
32
|
+
readonly name: "isRefunder";
|
|
33
|
+
readonly inputs: readonly [{
|
|
34
|
+
readonly name: "";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
}];
|
|
38
|
+
readonly outputs: readonly [{
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly type: "bool";
|
|
41
|
+
readonly internalType: "bool";
|
|
42
|
+
}];
|
|
43
|
+
readonly stateMutability: "view";
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "function";
|
|
46
|
+
readonly name: "owner";
|
|
47
|
+
readonly inputs: readonly [];
|
|
48
|
+
readonly outputs: readonly [{
|
|
49
|
+
readonly name: "";
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
}];
|
|
53
|
+
readonly stateMutability: "view";
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "function";
|
|
56
|
+
readonly name: "pendingOwner";
|
|
57
|
+
readonly inputs: readonly [];
|
|
58
|
+
readonly outputs: readonly [{
|
|
59
|
+
readonly name: "";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
}];
|
|
63
|
+
readonly stateMutability: "view";
|
|
64
|
+
}, {
|
|
65
|
+
readonly type: "function";
|
|
66
|
+
readonly name: "refund";
|
|
67
|
+
readonly inputs: readonly [{
|
|
68
|
+
readonly name: "to";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
readonly internalType: "address";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "amount";
|
|
73
|
+
readonly type: "uint256";
|
|
74
|
+
readonly internalType: "uint256";
|
|
75
|
+
}];
|
|
76
|
+
readonly outputs: readonly [];
|
|
77
|
+
readonly stateMutability: "nonpayable";
|
|
78
|
+
}, {
|
|
79
|
+
readonly type: "function";
|
|
80
|
+
readonly name: "renounceOwnership";
|
|
81
|
+
readonly inputs: readonly [];
|
|
82
|
+
readonly outputs: readonly [];
|
|
83
|
+
readonly stateMutability: "nonpayable";
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "function";
|
|
86
|
+
readonly name: "setRefunder";
|
|
87
|
+
readonly inputs: readonly [{
|
|
88
|
+
readonly name: "refunder";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
readonly internalType: "address";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "allowed";
|
|
93
|
+
readonly type: "bool";
|
|
94
|
+
readonly internalType: "bool";
|
|
95
|
+
}];
|
|
96
|
+
readonly outputs: readonly [];
|
|
97
|
+
readonly stateMutability: "nonpayable";
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "function";
|
|
100
|
+
readonly name: "token";
|
|
101
|
+
readonly inputs: readonly [];
|
|
102
|
+
readonly outputs: readonly [{
|
|
103
|
+
readonly name: "";
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
readonly internalType: "contract TasraToken";
|
|
106
|
+
}];
|
|
107
|
+
readonly stateMutability: "view";
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "function";
|
|
110
|
+
readonly name: "transferOwnership";
|
|
111
|
+
readonly inputs: readonly [{
|
|
112
|
+
readonly name: "newOwner";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
readonly internalType: "address";
|
|
115
|
+
}];
|
|
116
|
+
readonly outputs: readonly [];
|
|
117
|
+
readonly stateMutability: "nonpayable";
|
|
118
|
+
}, {
|
|
119
|
+
readonly type: "function";
|
|
120
|
+
readonly name: "withdraw";
|
|
121
|
+
readonly inputs: readonly [{
|
|
122
|
+
readonly name: "to";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
readonly internalType: "address";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "amount";
|
|
127
|
+
readonly type: "uint256";
|
|
128
|
+
readonly internalType: "uint256";
|
|
129
|
+
}];
|
|
130
|
+
readonly outputs: readonly [];
|
|
131
|
+
readonly stateMutability: "nonpayable";
|
|
132
|
+
}, {
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
readonly name: "withdrawToken";
|
|
135
|
+
readonly inputs: readonly [{
|
|
136
|
+
readonly name: "asset";
|
|
137
|
+
readonly type: "address";
|
|
138
|
+
readonly internalType: "contract IERC20";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "to";
|
|
141
|
+
readonly type: "address";
|
|
142
|
+
readonly internalType: "address";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "amount";
|
|
145
|
+
readonly type: "uint256";
|
|
146
|
+
readonly internalType: "uint256";
|
|
147
|
+
}];
|
|
148
|
+
readonly outputs: readonly [];
|
|
149
|
+
readonly stateMutability: "nonpayable";
|
|
150
|
+
}, {
|
|
151
|
+
readonly type: "event";
|
|
152
|
+
readonly name: "OwnershipTransferStarted";
|
|
153
|
+
readonly inputs: readonly [{
|
|
154
|
+
readonly name: "previousOwner";
|
|
155
|
+
readonly type: "address";
|
|
156
|
+
readonly indexed: true;
|
|
157
|
+
readonly internalType: "address";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "newOwner";
|
|
160
|
+
readonly type: "address";
|
|
161
|
+
readonly indexed: true;
|
|
162
|
+
readonly internalType: "address";
|
|
163
|
+
}];
|
|
164
|
+
readonly anonymous: false;
|
|
165
|
+
}, {
|
|
166
|
+
readonly type: "event";
|
|
167
|
+
readonly name: "OwnershipTransferred";
|
|
168
|
+
readonly inputs: readonly [{
|
|
169
|
+
readonly name: "previousOwner";
|
|
170
|
+
readonly type: "address";
|
|
171
|
+
readonly indexed: true;
|
|
172
|
+
readonly internalType: "address";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "newOwner";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
readonly indexed: true;
|
|
177
|
+
readonly internalType: "address";
|
|
178
|
+
}];
|
|
179
|
+
readonly anonymous: false;
|
|
180
|
+
}, {
|
|
181
|
+
readonly type: "event";
|
|
182
|
+
readonly name: "Refunded";
|
|
183
|
+
readonly inputs: readonly [{
|
|
184
|
+
readonly name: "to";
|
|
185
|
+
readonly type: "address";
|
|
186
|
+
readonly indexed: true;
|
|
187
|
+
readonly internalType: "address";
|
|
188
|
+
}, {
|
|
189
|
+
readonly name: "amount";
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
readonly indexed: false;
|
|
192
|
+
readonly internalType: "uint256";
|
|
193
|
+
}];
|
|
194
|
+
readonly anonymous: false;
|
|
195
|
+
}, {
|
|
196
|
+
readonly type: "event";
|
|
197
|
+
readonly name: "RefunderSet";
|
|
198
|
+
readonly inputs: readonly [{
|
|
199
|
+
readonly name: "refunder";
|
|
200
|
+
readonly type: "address";
|
|
201
|
+
readonly indexed: true;
|
|
202
|
+
readonly internalType: "address";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "allowed";
|
|
205
|
+
readonly type: "bool";
|
|
206
|
+
readonly indexed: false;
|
|
207
|
+
readonly internalType: "bool";
|
|
208
|
+
}];
|
|
209
|
+
readonly anonymous: false;
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "event";
|
|
212
|
+
readonly name: "TokenWithdrawn";
|
|
213
|
+
readonly inputs: readonly [{
|
|
214
|
+
readonly name: "asset";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
readonly indexed: true;
|
|
217
|
+
readonly internalType: "address";
|
|
218
|
+
}, {
|
|
219
|
+
readonly name: "to";
|
|
220
|
+
readonly type: "address";
|
|
221
|
+
readonly indexed: true;
|
|
222
|
+
readonly internalType: "address";
|
|
223
|
+
}, {
|
|
224
|
+
readonly name: "amount";
|
|
225
|
+
readonly type: "uint256";
|
|
226
|
+
readonly indexed: false;
|
|
227
|
+
readonly internalType: "uint256";
|
|
228
|
+
}];
|
|
229
|
+
readonly anonymous: false;
|
|
230
|
+
}, {
|
|
231
|
+
readonly type: "event";
|
|
232
|
+
readonly name: "Withdrawn";
|
|
233
|
+
readonly inputs: readonly [{
|
|
234
|
+
readonly name: "to";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
readonly indexed: true;
|
|
237
|
+
readonly internalType: "address";
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "amount";
|
|
240
|
+
readonly type: "uint256";
|
|
241
|
+
readonly indexed: false;
|
|
242
|
+
readonly internalType: "uint256";
|
|
243
|
+
}];
|
|
244
|
+
readonly anonymous: false;
|
|
245
|
+
}, {
|
|
246
|
+
readonly type: "error";
|
|
247
|
+
readonly name: "InsufficientBalance";
|
|
248
|
+
readonly inputs: readonly [{
|
|
249
|
+
readonly name: "requested";
|
|
250
|
+
readonly type: "uint256";
|
|
251
|
+
readonly internalType: "uint256";
|
|
252
|
+
}, {
|
|
253
|
+
readonly name: "available";
|
|
254
|
+
readonly type: "uint256";
|
|
255
|
+
readonly internalType: "uint256";
|
|
256
|
+
}];
|
|
257
|
+
}, {
|
|
258
|
+
readonly type: "error";
|
|
259
|
+
readonly name: "NotRefunder";
|
|
260
|
+
readonly inputs: readonly [];
|
|
261
|
+
}, {
|
|
262
|
+
readonly type: "error";
|
|
263
|
+
readonly name: "OwnableInvalidOwner";
|
|
264
|
+
readonly inputs: readonly [{
|
|
265
|
+
readonly name: "owner";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
}];
|
|
269
|
+
}, {
|
|
270
|
+
readonly type: "error";
|
|
271
|
+
readonly name: "OwnableUnauthorizedAccount";
|
|
272
|
+
readonly inputs: readonly [{
|
|
273
|
+
readonly name: "account";
|
|
274
|
+
readonly type: "address";
|
|
275
|
+
readonly internalType: "address";
|
|
276
|
+
}];
|
|
277
|
+
}, {
|
|
278
|
+
readonly type: "error";
|
|
279
|
+
readonly name: "OwnershipRenounceDisabled";
|
|
280
|
+
readonly inputs: readonly [];
|
|
281
|
+
}, {
|
|
282
|
+
readonly type: "error";
|
|
283
|
+
readonly name: "SafeERC20FailedOperation";
|
|
284
|
+
readonly inputs: readonly [{
|
|
285
|
+
readonly name: "token";
|
|
286
|
+
readonly type: "address";
|
|
287
|
+
readonly internalType: "address";
|
|
288
|
+
}];
|
|
289
|
+
}, {
|
|
290
|
+
readonly type: "error";
|
|
291
|
+
readonly name: "TransferFailed";
|
|
292
|
+
readonly inputs: readonly [];
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "error";
|
|
295
|
+
readonly name: "UseTsraWithdraw";
|
|
296
|
+
readonly inputs: readonly [];
|
|
297
|
+
}, {
|
|
298
|
+
readonly type: "error";
|
|
299
|
+
readonly name: "ZeroAddress";
|
|
300
|
+
readonly inputs: readonly [];
|
|
301
|
+
}];
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
// Contract ABI data is refreshed from the contract build artifacts.
|
|
2
|
+
// Source: contracts/out/Treasury.sol/Treasury.json (`abi` field).
|
|
3
|
+
/** Treasury contract interface for treasury balances, authorized withdrawals and refunds. */
|
|
4
|
+
export const treasuryAbi = [
|
|
5
|
+
{
|
|
6
|
+
"type": "constructor",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"name": "token_",
|
|
10
|
+
"type": "address",
|
|
11
|
+
"internalType": "contract TasraToken"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "owner_",
|
|
15
|
+
"type": "address",
|
|
16
|
+
"internalType": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "nonpayable"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "function",
|
|
23
|
+
"name": "acceptOwnership",
|
|
24
|
+
"inputs": [],
|
|
25
|
+
"outputs": [],
|
|
26
|
+
"stateMutability": "nonpayable"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "function",
|
|
30
|
+
"name": "balance",
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"outputs": [
|
|
33
|
+
{
|
|
34
|
+
"name": "",
|
|
35
|
+
"type": "uint256",
|
|
36
|
+
"internalType": "uint256"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"stateMutability": "view"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "function",
|
|
43
|
+
"name": "isRefunder",
|
|
44
|
+
"inputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "",
|
|
47
|
+
"type": "address",
|
|
48
|
+
"internalType": "address"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"outputs": [
|
|
52
|
+
{
|
|
53
|
+
"name": "",
|
|
54
|
+
"type": "bool",
|
|
55
|
+
"internalType": "bool"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"stateMutability": "view"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "function",
|
|
62
|
+
"name": "owner",
|
|
63
|
+
"inputs": [],
|
|
64
|
+
"outputs": [
|
|
65
|
+
{
|
|
66
|
+
"name": "",
|
|
67
|
+
"type": "address",
|
|
68
|
+
"internalType": "address"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"stateMutability": "view"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "function",
|
|
75
|
+
"name": "pendingOwner",
|
|
76
|
+
"inputs": [],
|
|
77
|
+
"outputs": [
|
|
78
|
+
{
|
|
79
|
+
"name": "",
|
|
80
|
+
"type": "address",
|
|
81
|
+
"internalType": "address"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"stateMutability": "view"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "function",
|
|
88
|
+
"name": "refund",
|
|
89
|
+
"inputs": [
|
|
90
|
+
{
|
|
91
|
+
"name": "to",
|
|
92
|
+
"type": "address",
|
|
93
|
+
"internalType": "address"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "amount",
|
|
97
|
+
"type": "uint256",
|
|
98
|
+
"internalType": "uint256"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"outputs": [],
|
|
102
|
+
"stateMutability": "nonpayable"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "function",
|
|
106
|
+
"name": "renounceOwnership",
|
|
107
|
+
"inputs": [],
|
|
108
|
+
"outputs": [],
|
|
109
|
+
"stateMutability": "nonpayable"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "function",
|
|
113
|
+
"name": "setRefunder",
|
|
114
|
+
"inputs": [
|
|
115
|
+
{
|
|
116
|
+
"name": "refunder",
|
|
117
|
+
"type": "address",
|
|
118
|
+
"internalType": "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "allowed",
|
|
122
|
+
"type": "bool",
|
|
123
|
+
"internalType": "bool"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"outputs": [],
|
|
127
|
+
"stateMutability": "nonpayable"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "function",
|
|
131
|
+
"name": "token",
|
|
132
|
+
"inputs": [],
|
|
133
|
+
"outputs": [
|
|
134
|
+
{
|
|
135
|
+
"name": "",
|
|
136
|
+
"type": "address",
|
|
137
|
+
"internalType": "contract TasraToken"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"stateMutability": "view"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "function",
|
|
144
|
+
"name": "transferOwnership",
|
|
145
|
+
"inputs": [
|
|
146
|
+
{
|
|
147
|
+
"name": "newOwner",
|
|
148
|
+
"type": "address",
|
|
149
|
+
"internalType": "address"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"outputs": [],
|
|
153
|
+
"stateMutability": "nonpayable"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "function",
|
|
157
|
+
"name": "withdraw",
|
|
158
|
+
"inputs": [
|
|
159
|
+
{
|
|
160
|
+
"name": "to",
|
|
161
|
+
"type": "address",
|
|
162
|
+
"internalType": "address"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "amount",
|
|
166
|
+
"type": "uint256",
|
|
167
|
+
"internalType": "uint256"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"outputs": [],
|
|
171
|
+
"stateMutability": "nonpayable"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "function",
|
|
175
|
+
"name": "withdrawToken",
|
|
176
|
+
"inputs": [
|
|
177
|
+
{
|
|
178
|
+
"name": "asset",
|
|
179
|
+
"type": "address",
|
|
180
|
+
"internalType": "contract IERC20"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "to",
|
|
184
|
+
"type": "address",
|
|
185
|
+
"internalType": "address"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "amount",
|
|
189
|
+
"type": "uint256",
|
|
190
|
+
"internalType": "uint256"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"outputs": [],
|
|
194
|
+
"stateMutability": "nonpayable"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "event",
|
|
198
|
+
"name": "OwnershipTransferStarted",
|
|
199
|
+
"inputs": [
|
|
200
|
+
{
|
|
201
|
+
"name": "previousOwner",
|
|
202
|
+
"type": "address",
|
|
203
|
+
"indexed": true,
|
|
204
|
+
"internalType": "address"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "newOwner",
|
|
208
|
+
"type": "address",
|
|
209
|
+
"indexed": true,
|
|
210
|
+
"internalType": "address"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"anonymous": false
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "event",
|
|
217
|
+
"name": "OwnershipTransferred",
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"name": "previousOwner",
|
|
221
|
+
"type": "address",
|
|
222
|
+
"indexed": true,
|
|
223
|
+
"internalType": "address"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "newOwner",
|
|
227
|
+
"type": "address",
|
|
228
|
+
"indexed": true,
|
|
229
|
+
"internalType": "address"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"anonymous": false
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "event",
|
|
236
|
+
"name": "Refunded",
|
|
237
|
+
"inputs": [
|
|
238
|
+
{
|
|
239
|
+
"name": "to",
|
|
240
|
+
"type": "address",
|
|
241
|
+
"indexed": true,
|
|
242
|
+
"internalType": "address"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "amount",
|
|
246
|
+
"type": "uint256",
|
|
247
|
+
"indexed": false,
|
|
248
|
+
"internalType": "uint256"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"anonymous": false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"type": "event",
|
|
255
|
+
"name": "RefunderSet",
|
|
256
|
+
"inputs": [
|
|
257
|
+
{
|
|
258
|
+
"name": "refunder",
|
|
259
|
+
"type": "address",
|
|
260
|
+
"indexed": true,
|
|
261
|
+
"internalType": "address"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "allowed",
|
|
265
|
+
"type": "bool",
|
|
266
|
+
"indexed": false,
|
|
267
|
+
"internalType": "bool"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"anonymous": false
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "event",
|
|
274
|
+
"name": "TokenWithdrawn",
|
|
275
|
+
"inputs": [
|
|
276
|
+
{
|
|
277
|
+
"name": "asset",
|
|
278
|
+
"type": "address",
|
|
279
|
+
"indexed": true,
|
|
280
|
+
"internalType": "address"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "to",
|
|
284
|
+
"type": "address",
|
|
285
|
+
"indexed": true,
|
|
286
|
+
"internalType": "address"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "amount",
|
|
290
|
+
"type": "uint256",
|
|
291
|
+
"indexed": false,
|
|
292
|
+
"internalType": "uint256"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"anonymous": false
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "event",
|
|
299
|
+
"name": "Withdrawn",
|
|
300
|
+
"inputs": [
|
|
301
|
+
{
|
|
302
|
+
"name": "to",
|
|
303
|
+
"type": "address",
|
|
304
|
+
"indexed": true,
|
|
305
|
+
"internalType": "address"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "amount",
|
|
309
|
+
"type": "uint256",
|
|
310
|
+
"indexed": false,
|
|
311
|
+
"internalType": "uint256"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"anonymous": false
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"type": "error",
|
|
318
|
+
"name": "InsufficientBalance",
|
|
319
|
+
"inputs": [
|
|
320
|
+
{
|
|
321
|
+
"name": "requested",
|
|
322
|
+
"type": "uint256",
|
|
323
|
+
"internalType": "uint256"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "available",
|
|
327
|
+
"type": "uint256",
|
|
328
|
+
"internalType": "uint256"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"type": "error",
|
|
334
|
+
"name": "NotRefunder",
|
|
335
|
+
"inputs": []
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"type": "error",
|
|
339
|
+
"name": "OwnableInvalidOwner",
|
|
340
|
+
"inputs": [
|
|
341
|
+
{
|
|
342
|
+
"name": "owner",
|
|
343
|
+
"type": "address",
|
|
344
|
+
"internalType": "address"
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"type": "error",
|
|
350
|
+
"name": "OwnableUnauthorizedAccount",
|
|
351
|
+
"inputs": [
|
|
352
|
+
{
|
|
353
|
+
"name": "account",
|
|
354
|
+
"type": "address",
|
|
355
|
+
"internalType": "address"
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"type": "error",
|
|
361
|
+
"name": "OwnershipRenounceDisabled",
|
|
362
|
+
"inputs": []
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"type": "error",
|
|
366
|
+
"name": "SafeERC20FailedOperation",
|
|
367
|
+
"inputs": [
|
|
368
|
+
{
|
|
369
|
+
"name": "token",
|
|
370
|
+
"type": "address",
|
|
371
|
+
"internalType": "address"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"type": "error",
|
|
377
|
+
"name": "TransferFailed",
|
|
378
|
+
"inputs": []
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"type": "error",
|
|
382
|
+
"name": "UseTsraWithdraw",
|
|
383
|
+
"inputs": []
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"type": "error",
|
|
387
|
+
"name": "ZeroAddress",
|
|
388
|
+
"inputs": []
|
|
389
|
+
}
|
|
390
|
+
];
|