UNPKG

@citizenwallet/sdk

Version:

An sdk to easily work with citizen wallet.

1,201 lines 28.7 kB
[ { "type": "function", "name": "NAME", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "UPGRADE_INTERFACE_VERSION", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "VERSION", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "addOwner", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" }, { "name": "newOwner", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "authorizeNewInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "newInstanceId", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "authorizedInstances", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "callOnCard", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" }, { "name": "to", "type": "address", "internalType": "address" }, { "name": "value", "type": "uint256", "internalType": "uint256" }, { "name": "data", "type": "bytes", "internalType": "bytes" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "cardCount", "inputs": [], "outputs": [ { "name": "", "type": "int256", "internalType": "int256" } ], "stateMutability": "view" }, { "type": "function", "name": "cardFactory", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "contractExists", "inputs": [ { "name": "contractAddress", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "createCard", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "createInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "contracts", "type": "address[]", "internalType": "address[]" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "domainSeparator", "inputs": [], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "encodeMessageDataForSafe", "inputs": [ { "name": "safe", "type": "address", "internalType": "contract Safe" }, { "name": "message", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes", "internalType": "bytes" } ], "stateMutability": "view" }, { "type": "function", "name": "getCardAddress", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "getCardHash", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "hashedSerial", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "getChainId", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getInstanceId", "inputs": [ { "name": "salt", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "getMessageHash", "inputs": [ { "name": "message", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "getMessageHashForSafe", "inputs": [ { "name": "safe", "type": "address", "internalType": "contract Safe" }, { "name": "message", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "getModules", "inputs": [], "outputs": [ { "name": "", "type": "address[]", "internalType": "address[]" } ], "stateMutability": "view" }, { "type": "function", "name": "initialize", "inputs": [ { "name": "_owner", "type": "address", "internalType": "address" }, { "name": "_cardFactory", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "instanceContracts", "inputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" }, { "name": "", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "instanceCount", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "instanceOwner", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "instanceOwners", "inputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "instancePaused", "inputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "isValidSignature", "inputs": [ { "name": "_dataHash", "type": "bytes32", "internalType": "bytes32" }, { "name": "_signature", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "view" }, { "type": "function", "name": "isValidSignature", "inputs": [ { "name": "_data", "type": "bytes", "internalType": "bytes" }, { "name": "_signature", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "view" }, { "type": "function", "name": "isWhitelisted", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "addr", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "onERC1155BatchReceived", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "pure" }, { "type": "function", "name": "onERC1155Received", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "pure" }, { "type": "function", "name": "onERC721Received", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bytes4", "internalType": "bytes4" } ], "stateMutability": "pure" }, { "type": "function", "name": "owner", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "pauseInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "proxiableUUID", "inputs": [], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "renounceOwnership", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "simulate", "inputs": [ { "name": "targetContract", "type": "address", "internalType": "address" }, { "name": "calldataPayload", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "response", "type": "bytes", "internalType": "bytes" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "supportsInterface", "inputs": [ { "name": "interfaceId", "type": "bytes4", "internalType": "bytes4" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "tokensReceived", "inputs": [ { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "address", "internalType": "address" }, { "name": "", "type": "uint256", "internalType": "uint256" }, { "name": "", "type": "bytes", "internalType": "bytes" }, { "name": "", "type": "bytes", "internalType": "bytes" } ], "outputs": [], "stateMutability": "pure" }, { "type": "function", "name": "transferOwnership", "inputs": [ { "name": "newOwner", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "unpauseInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "updateInstanceContracts", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "contracts", "type": "address[]", "internalType": "address[]" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "updateWhitelist", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "addresses", "type": "address[]", "internalType": "address[]" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "upgradeToAndCall", "inputs": [ { "name": "newImplementation", "type": "address", "internalType": "address" }, { "name": "data", "type": "bytes", "internalType": "bytes" } ], "outputs": [], "stateMutability": "payable" }, { "type": "event", "name": "CardCreated", "inputs": [ { "name": "card", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "Initialized", "inputs": [ { "name": "version", "type": "uint64", "indexed": false, "internalType": "uint64" } ], "anonymous": false }, { "type": "event", "name": "InstanceCreated", "inputs": [ { "name": "id", "type": "bytes32", "indexed": false, "internalType": "bytes32" }, { "name": "owner", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "OwnershipTransferred", "inputs": [ { "name": "previousOwner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "newOwner", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "Upgraded", "inputs": [ { "name": "implementation", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "WhitelistUpdated", "inputs": [ { "name": "id", "type": "bytes32", "indexed": false, "internalType": "bytes32" }, { "name": "addresses", "type": "address[]", "indexed": false, "internalType": "address[]" } ], "anonymous": false }, { "type": "error", "name": "AddressEmptyCode", "inputs": [ { "name": "target", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "CM10_InstanceAlreadyExists", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ] }, { "type": "error", "name": "CM11_OnlyInstanceOwner", "inputs": [ { "name": "instanceOwner", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "CM12_InstanceDoesNotExist", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ] }, { "type": "error", "name": "CM13_InstanceIsPaused", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ] }, { "type": "error", "name": "CM14_InstanceNotAuthorized", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ] }, { "type": "error", "name": "CM15_NoTokensAuthorizedForInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" } ] }, { "type": "error", "name": "CM16_TokenNotAuthorizedForInstance", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "token", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "CM20_AddressNotWhitelisted", "inputs": [ { "name": "id", "type": "bytes32", "internalType": "bytes32" }, { "name": "addr", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "CM33_CardNotCreated", "inputs": [] }, { "type": "error", "name": "CM34_FailedToAddOwner", "inputs": [] }, { "type": "error", "name": "CM40_FailedToWithdraw", "inputs": [] }, { "type": "error", "name": "ERC1967InvalidImplementation", "inputs": [ { "name": "implementation", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ERC1967NonPayable", "inputs": [] }, { "type": "error", "name": "FailedInnerCall", "inputs": [] }, { "type": "error", "name": "InvalidInitialization", "inputs": [] }, { "type": "error", "name": "NotInitializing", "inputs": [] }, { "type": "error", "name": "OwnableInvalidOwner", "inputs": [ { "name": "owner", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "OwnableUnauthorizedAccount", "inputs": [ { "name": "account", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ReentrancyGuardReentrantCall", "inputs": [] }, { "type": "error", "name": "UUPSUnauthorizedCallContext", "inputs": [] }, { "type": "error", "name": "UUPSUnsupportedProxiableUUID", "inputs": [ { "name": "slot", "type": "bytes32", "internalType": "bytes32" } ] } ]