├── .nvmrc ├── packages ├── dev-utils │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig-cjs.json │ ├── src │ │ └── describeEach.ts │ ├── README.md │ └── tsconfig-base.json ├── sdk │ ├── base │ │ ├── src │ │ │ ├── types.d.ts │ │ │ ├── currencies.ts │ │ │ ├── io.ts │ │ │ ├── logger.ts │ │ │ ├── phoneNumbers.ts │ │ │ ├── index.ts │ │ │ ├── package.test.ts │ │ │ ├── parsing.test.ts │ │ │ └── string.ts │ │ ├── .gitignore │ │ ├── jest.config.js │ │ ├── .npmignore │ │ ├── tsconfig.json │ │ └── typedoc.json │ ├── metadata-claims │ │ ├── .gitignore │ │ ├── src │ │ │ └── index.ts │ │ ├── .npmignore │ │ ├── tsconfig.json │ │ ├── jestSetup.ts │ │ ├── jest.config.js │ │ └── typedoc.json │ ├── wallets │ │ ├── wallet-base │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-hsm │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-local │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-ledger │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-remote │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-hsm-aws │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-hsm-azure │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── tsconfig.json │ │ │ ├── .npmignore │ │ │ └── typedoc.json │ │ ├── wallet-hsm-gcp │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── jest.config.js │ │ │ ├── .env.example │ │ │ ├── .npmignore │ │ │ ├── tsconfig.json │ │ │ └── typedoc.json │ │ └── wallet-rpc │ │ │ └── lib │ │ │ ├── index.d.ts │ │ │ ├── test-utils │ │ │ ├── ganache.setup.d.ts │ │ │ ├── ganache.teardown.d.ts │ │ │ ├── ganache.teardown.js.map │ │ │ ├── ganache.setup.js.map │ │ │ └── ganache.teardown.js │ │ │ └── index.js.map │ ├── connect │ │ ├── .gitignore │ │ ├── jest.config.js │ │ ├── tsconfig.json │ │ ├── .npmignore │ │ ├── src │ │ │ └── index.ts │ │ └── typedoc.json │ ├── utils │ │ ├── .gitignore │ │ ├── src │ │ │ ├── solidity.ts │ │ │ ├── future.ts │ │ │ ├── logger.ts │ │ │ ├── inputValidation.ts │ │ │ ├── index.ts │ │ │ ├── async.ts │ │ │ ├── string.ts │ │ │ ├── task.ts │ │ │ ├── celoHistory.ts │ │ │ └── parsing.ts │ │ ├── jest.config.js │ │ ├── .npmignore │ │ ├── tsconfig.json │ │ └── typedoc.json │ ├── explorer │ │ ├── .gitignore │ │ ├── src │ │ │ ├── index.ts │ │ │ └── globals.d.ts │ │ ├── tsconfig.json │ │ ├── jest.config.js │ │ ├── .npmignore │ │ ├── jestSetup.ts │ │ └── typedoc.json │ ├── governance │ │ ├── .gitignore │ │ ├── src │ │ │ ├── index.ts │ │ │ └── test-utils │ │ │ │ ├── setup.global.ts │ │ │ │ └── globals.d.ts │ │ ├── .npmignore │ │ ├── jest.config.js │ │ ├── tsconfig.json │ │ ├── jest_setup.ts │ │ └── typedoc.json │ ├── keystores │ │ ├── .gitignore │ │ ├── jest.config.js │ │ ├── src │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ ├── .npmignore │ │ └── typedoc.json │ ├── phone-utils │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── jest.config.js │ │ ├── tsconfig.json │ │ ├── typedoc.json │ │ └── src │ │ │ └── index.ts │ ├── transactions-uri │ │ ├── .gitignore │ │ ├── src │ │ │ ├── index.ts │ │ │ └── test-utils │ │ │ │ ├── setup.global.ts │ │ │ │ └── teardown.global.ts │ │ ├── .npmignore │ │ ├── tsconfig.json │ │ ├── jestSetup.ts │ │ ├── jest.config.js │ │ └── typedoc.json │ ├── cryptographic-utils │ │ ├── .gitignore │ │ ├── src │ │ │ ├── types.d.ts │ │ │ └── index.ts │ │ ├── jest.config.js │ │ ├── .npmignore │ │ ├── tsconfig.json │ │ └── typedoc.json │ └── contractkit │ │ ├── src │ │ ├── test-utils │ │ │ ├── setup.global.ts │ │ │ ├── teardown.global.ts │ │ │ └── AlphabeticSequencer.js │ │ ├── globals.d.ts │ │ ├── index.ts │ │ ├── wrappers │ │ │ └── Freezer.ts │ │ └── utils │ │ │ └── getParsedSignatureOfAddress.ts │ │ ├── .gitignore │ │ ├── jest_setup.ts │ │ ├── .npmignore │ │ ├── jest.config.js │ │ └── tsconfig.json ├── cli │ ├── exampleProposal.json │ ├── homebrew │ │ ├── Formula │ │ │ └── .gitignore │ │ └── scripts │ │ │ └── test.sh │ ├── .gitattributes │ ├── bin │ │ ├── dev.cmd │ │ ├── run.cmd │ │ ├── run.js │ │ └── dev.js │ ├── src │ │ ├── index.ts │ │ ├── test-utils │ │ │ ├── teardown.global.ts │ │ │ ├── setupAfterEnv.ts │ │ │ ├── setup.global.ts │ │ │ └── setup.ts │ │ ├── help.ts │ │ ├── scripts │ │ │ └── postinstall.ts │ │ └── utils │ │ │ ├── lockedgold.ts │ │ │ ├── notice.ts │ │ │ └── fee-currency.ts │ ├── .npmignore │ ├── types │ │ └── hw-transport-node-hid.d.ts │ ├── .gitignore │ ├── dev-guide.md │ ├── DEVELOP.md │ ├── jest.config.js │ ├── tsconfig.json │ └── generate_docs.sh ├── core │ ├── .gitignore │ ├── src │ │ ├── staking │ │ │ └── index.ts │ │ ├── index.ts │ │ └── governing │ │ │ └── index.ts │ ├── tsconfig.json │ ├── tsconfig-cjs.json │ ├── docs │ │ └── globals.md │ ├── .npmignore │ ├── tsconfig-base.json │ └── vitest.config.ts ├── actions │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig-cjs.json │ ├── src │ │ ├── index.ts │ │ ├── multicontract-interactions │ │ │ └── stake │ │ │ │ └── index.ts │ │ ├── rpc-methods.ts │ │ ├── contract-name.ts │ │ ├── contracts │ │ │ ├── erc20.ts │ │ │ ├── multisig.ts │ │ │ └── release-celo.ts │ │ └── rpc-methods.test.ts │ ├── docs │ │ ├── modules.md │ │ └── multicontract-interactions │ │ │ └── stake │ │ │ └── README.md │ ├── .npmignore │ ├── tsconfig-base.json │ └── vitest.config.ts ├── viem-account-ledger │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig-cjs.json │ ├── .npmignore │ ├── src │ │ ├── constants.ts │ │ └── index.ts │ ├── tsconfig-base.json │ └── vitest.config.ts ├── typescript │ ├── package.json │ ├── tsconfig.json │ └── tsconfig.library.json └── docs │ └── viem-account-ledger │ ├── type-aliases │ └── LedgerAccount.md │ └── variables │ ├── DEFAULT_DERIVATION_PATH.md │ └── CELO_BASE_DERIVATION_PATH.md ├── .dockerfile ├── .gitattributes ├── .husky ├── pre-push └── pre-commit ├── docs └── sdk │ ├── metadata-claims │ ├── index │ │ └── README.md │ ├── verify │ │ └── README.md │ ├── README.md │ ├── metadata │ │ ├── README.md │ │ └── type-aliases │ │ │ └── IdentityMetadata.md │ ├── claim │ │ ├── type-aliases │ │ │ ├── NameClaim.md │ │ │ ├── DomainClaim.md │ │ │ ├── RpcUrlClaim.md │ │ │ ├── StorageClaim.md │ │ │ └── KeybaseClaim.md │ │ ├── variables │ │ │ ├── DOMAIN_TXT_HEADER.md │ │ │ └── KeybaseClaimType.md │ │ └── functions │ │ │ ├── hashOfClaim.md │ │ │ ├── hashOfClaims.md │ │ │ └── serializeClaim.md │ ├── types │ │ ├── variables │ │ │ ├── SignatureType.md │ │ │ ├── TimestampType.md │ │ │ ├── SINGULAR_CLAIM_TYPES.md │ │ │ └── VERIFIABLE_CLAIM_TYPES.md │ │ └── functions │ │ │ └── now.md │ ├── account │ │ ├── README.md │ │ └── type-aliases │ │ │ └── AccountClaim.md │ └── keybase │ │ ├── README.md │ │ ├── variables │ │ └── keybaseFilePathToProof.md │ │ └── functions │ │ └── proofFileName.md │ ├── wallet-remote │ └── README.md │ ├── wallet-local │ └── README.md │ ├── wallet-hsm-aws │ └── README.md │ ├── wallet-hsm-gcp │ └── README.md │ ├── network-utils │ └── README.md │ ├── contractkit │ ├── type-aliases │ │ ├── Address.md │ │ ├── CeloTokenType.md │ │ ├── HttpProviderOptions.md │ │ ├── CeloToken.md │ │ └── CeloTokenContract.md │ ├── variables │ │ ├── NULL_ADDRESS.md │ │ ├── PROXY_ABI.md │ │ ├── AllContracts.md │ │ ├── GET_IMPLEMENTATION_ABI.md │ │ ├── SET_IMPLEMENTATION_ABI.md │ │ ├── TRANSFER_OWNERSHIP_ABI.md │ │ ├── API_KEY_HEADER_KEY.md │ │ ├── RegisteredContracts.md │ │ ├── SET_AND_INITIALIZE_IMPLEMENTATION_ABI.md │ │ ├── PROXY_SET_IMPLEMENTATION_SIGNATURE.md │ │ ├── REGISTRY_CONTRACT_ADDRESS.md │ │ └── PROXY_SET_AND_INITIALIZE_IMPLEMENTATION_SIGNATURE.md │ ├── enumerations │ │ ├── Token.md │ │ └── StableToken.md │ └── functions │ │ └── setImplementationOnProxy.md │ ├── transactions-uri │ ├── README.md │ └── functions │ │ ├── parseUri.md │ │ ├── QrFromUri.md │ │ └── buildUri.md │ ├── wallet-hsm-azure │ └── README.md │ ├── utils │ ├── @celo │ │ └── namespaces │ │ │ └── AddressUtils │ │ │ ├── type-aliases │ │ │ └── Address.md │ │ │ ├── variables │ │ │ ├── NULL_ADDRESS.md │ │ │ ├── hexToBuffer.md │ │ │ ├── trimLeading0x.md │ │ │ ├── bufferToHex.md │ │ │ ├── getAddressChunks.md │ │ │ ├── ensureLeading0x.md │ │ │ ├── isHexString.md │ │ │ ├── normalizeAddress.md │ │ │ ├── eqAddress.md │ │ │ ├── normalizeAddressWith0x.md │ │ │ └── findAddressIndex.md │ │ │ └── functions │ │ │ ├── isValidPrivateKey.md │ │ │ ├── privateKeyToPublicKey.md │ │ │ ├── isValidAddress.md │ │ │ └── publicKeyToAddress.md │ └── README.md │ ├── base │ ├── type-aliases │ │ ├── Address.md │ │ ├── HexString.md │ │ ├── StrongAddress.md │ │ ├── DerivationPath.md │ │ ├── CeloTokenType.md │ │ ├── Logger.md │ │ ├── Comparator.md │ │ ├── RandomNumberGenerator.md │ │ └── Result.md │ ├── variables │ │ ├── URL_REGEX.md │ │ ├── POP_SIZE.md │ │ ├── NULL_ADDRESS.md │ │ ├── noopLogger.md │ │ ├── JSONParseErrorType.md │ │ ├── consoleLogger.md │ │ ├── ETHEREUM_DERIVATION_PATH.md │ │ └── CELO_DERIVATION_PATH_BASE.md │ ├── functions │ │ ├── zeroRange.md │ │ ├── hexToBuffer.md │ │ ├── isNullAddress.md │ │ ├── isValidUrl.md │ │ ├── trimLeading0x.md │ │ ├── normalizeAccents.md │ │ ├── normalizeAddress.md │ │ ├── bufferToHex.md │ │ ├── getAddressChunks.md │ │ ├── eqAddress.md │ │ ├── isE164Number.md │ │ ├── stringToBoolean.md │ │ ├── sleep.md │ │ ├── validateInteger.md │ │ ├── ensureLeading0x.md │ │ ├── appendPath.md │ │ ├── isHexString.md │ │ ├── normalizeAddressWith0x.md │ │ ├── intersection.md │ │ ├── findAddressIndex.md │ │ ├── serializeSignature.md │ │ ├── mapAddressListOnto.md │ │ ├── conditionWatcher.md │ │ ├── validateDecimal.md │ │ ├── notEmpty.md │ │ ├── Ok.md │ │ └── toFuture.md │ ├── enumerations │ │ └── Token.md │ └── interfaces │ │ └── BaseError.md │ ├── governance │ ├── variables │ │ ├── debug.md │ │ └── hotfixExecuteAbi.md │ ├── interfaces │ │ └── RegistryAdditions.md │ ├── type-aliases │ │ └── ProposalTxParams.md │ └── functions │ │ ├── hotfixToHash.md │ │ ├── isProxySetFunction.md │ │ ├── isProxySetAndInitFunction.md │ │ └── isRegistryRepoint.md │ ├── connect │ ├── type-aliases │ │ ├── Hex.md │ │ ├── Address.md │ │ ├── AccessListRaw.md │ │ ├── HexOrMissing.md │ │ ├── BlockNumber.md │ │ ├── CeloTxWithSig.md │ │ ├── ABIType.md │ │ ├── CeloTxPending.md │ │ ├── CeloTxReceipt.md │ │ ├── TransactionTypes.md │ │ └── CeloTransactionParams.md │ ├── functions │ │ ├── getRandomId.md │ │ └── isPresent.md │ └── variables │ │ └── PROXY_ADMIN_ADDRESS.md │ ├── wallet-hsm │ ├── variables │ │ ├── sixtyFour.md │ │ ├── thirtyTwo.md │ │ └── publicKeyPrefix.md │ └── functions │ │ ├── toArrayBuffer.md │ │ ├── publicKeyFromAsn1.md │ │ ├── bufferToBigNumber.md │ │ ├── getAddressFromPublicKey.md │ │ ├── bigNumberToBuffer.md │ │ └── asn1FromPublicKey.md │ ├── cryptographic-utils │ ├── variables │ │ ├── CELO_DERIVATION_PATH_BASE.md │ │ ├── BLS_POP_SIZE.md │ │ └── BLS_PUBLIC_KEY_SIZE.md │ ├── type-aliases │ │ └── RandomNumberGenerator.md │ ├── enumerations │ │ └── MnemonicStrength.md │ └── functions │ │ ├── getBlsPublicKey.md │ │ ├── getAllLanguages.md │ │ └── getBlsPoP.md │ ├── wallet-base │ ├── variables │ │ ├── sixtyFour.md │ │ ├── thirtyTwo.md │ │ └── publicKeyPrefix.md │ └── functions │ │ ├── isCIP64.md │ │ ├── isCIP66.md │ │ ├── isEIP1559.md │ │ ├── handleBigInt.md │ │ ├── handleData.md │ │ ├── handleNumber.md │ │ ├── isPriceToLow.md │ │ ├── rlpEncodedTx.md │ │ ├── handleStringNumber.md │ │ ├── handleHexString.md │ │ ├── recoverTransaction.md │ │ ├── getHashFromEncoded.md │ │ ├── determineTXType.md │ │ ├── chainIdTransformationForSigning.md │ │ ├── getSignerFromTxEIP2718TX.md │ │ └── stringNumberOrBNToHex.md │ ├── keystores │ └── README.md │ ├── explorer │ ├── variables │ │ └── getContractDetailsFromContract.md │ └── functions │ │ ├── newLogExplorer.md │ │ ├── mapFromPairs.md │ │ └── newBlockExplorer.md │ ├── phone-utils │ ├── variables │ │ └── E164PhoneNumberType.md │ ├── type-aliases │ │ ├── E164Number.md │ │ ├── AttestationRequest.md │ │ ├── AttestationResponse.md │ │ ├── GetAttestationRequest.md │ │ └── AttestationServiceTestRequest.md │ └── functions │ │ ├── isE164NumberStrict.md │ │ ├── getE164DisplayNumber.md │ │ ├── validateInput.md │ │ ├── getRegionCode.md │ │ ├── getCountryCode.md │ │ ├── getDisplayNumberInternational.md │ │ └── validatePhone.md │ └── wallet-ledger │ ├── variables │ └── CELO_BASE_DERIVATION_PATH.md │ └── README.md ├── .yarnrc.yml ├── .prettierrc.js ├── renovate.json ├── jest.config.js ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── issue-template.md ├── CODEOWNERS └── pull_request_template.md ├── scripts ├── post-build.mjs └── hooks │ └── prereleasecheck.sh ├── .prettierignore ├── .changeset ├── config.json └── README.md └── dt-renovate-base.json /.nvmrc: -------------------------------------------------------------------------------- 1 | 22 2 | -------------------------------------------------------------------------------- /packages/dev-utils/.gitignore: -------------------------------------------------------------------------------- 1 | lib -------------------------------------------------------------------------------- /packages/sdk/base/src/types.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/cli/exampleProposal.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/cli/homebrew/Formula/.gitignore: -------------------------------------------------------------------------------- 1 | celocli.rb -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/cli/.gitattributes: -------------------------------------------------------------------------------- 1 | README.md linguist-generated=true -------------------------------------------------------------------------------- /packages/cli/bin/dev.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | node "%~dp0\dev" %* -------------------------------------------------------------------------------- /packages/cli/bin/run.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | node "%~dp0\run" %* -------------------------------------------------------------------------------- /packages/cli/src/index.ts: -------------------------------------------------------------------------------- 1 | export { run } from '@oclif/core' 2 | -------------------------------------------------------------------------------- /packages/core/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | tmp/ 3 | .tmp/ 4 | .env 5 | -------------------------------------------------------------------------------- /packages/sdk/base/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | lib -------------------------------------------------------------------------------- /packages/sdk/connect/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | tmp/ 3 | .tmp/ 4 | .env -------------------------------------------------------------------------------- /packages/sdk/utils/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | lib -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | .env -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | .env -------------------------------------------------------------------------------- /packages/actions/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | tmp/ 3 | .tmp/ 4 | .env 5 | -------------------------------------------------------------------------------- /packages/core/src/staking/index.ts: -------------------------------------------------------------------------------- 1 | export * from './vote.js' 2 | -------------------------------------------------------------------------------- /packages/sdk/explorer/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | tmp/ 3 | .tmp/ 4 | .env -------------------------------------------------------------------------------- /packages/sdk/governance/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | tmp/ 3 | .tmp/ 4 | .env -------------------------------------------------------------------------------- /packages/sdk/governance/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proposals' 2 | -------------------------------------------------------------------------------- /packages/sdk/keystores/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | test-keystore-dir/ 3 | -------------------------------------------------------------------------------- /packages/sdk/phone-utils/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | lib -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | tmp/ 3 | .tmp/ 4 | .env -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tx-uri' 2 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | lib -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/src/types.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'bip39' 2 | -------------------------------------------------------------------------------- /packages/cli/.npmignore: -------------------------------------------------------------------------------- 1 | 2 | # use the files array in package.json to include files -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './remote-wallet' 2 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | lib-es/ 3 | tmp/ 4 | .tmp/ 5 | .env 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | .env 3 | .serviceAccountKey.json 4 | -------------------------------------------------------------------------------- /packages/cli/types/hw-transport-node-hid.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@ledgerhq/hw-transport-node-hid' 2 | -------------------------------------------------------------------------------- /.dockerfile: -------------------------------------------------------------------------------- 1 | # Ignore generated credentials from google-github-actions/auth 2 | gha-creds-*.json 3 | -------------------------------------------------------------------------------- /packages/cli/src/test-utils/teardown.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalTeardown() {} 2 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/solidity.ts: -------------------------------------------------------------------------------- 1 | export { sha3, soliditySha3, soliditySha3Raw } from 'web3-utils' 2 | -------------------------------------------------------------------------------- /packages/core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './governing/index.js' 2 | export * from './staking/index.js' 3 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/test-utils/setup.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalSetup() {} 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | /.yarn/releases/** binary 3 | /.yarn/plugins/** binary 4 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/test-utils/teardown.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalTeardown() {} 2 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/src/test-utils/setup.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalSetup() {} 2 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/src/test-utils/teardown.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalTeardown() {} 2 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './signing-utils' 2 | export * from './wallet-base' 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ber-utils' 2 | export * from './signature-utils' 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './local-signer' 2 | export * from './local-wallet' 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './rpc-signer'; 2 | export * from './rpc-wallet'; 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/test-utils/ganache.setup.d.ts: -------------------------------------------------------------------------------- 1 | export default function setup(): Promise; 2 | -------------------------------------------------------------------------------- /packages/cli/src/help.ts: -------------------------------------------------------------------------------- 1 | import { Help } from '@oclif/core' 2 | 3 | export default class CustomHelp extends Help {} 4 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/.gitignore: -------------------------------------------------------------------------------- 1 | src/generated 2 | lib/ 3 | .devchain/ 4 | .devchain.tar.gz 5 | tmp/ 6 | .tmp/ 7 | .env -------------------------------------------------------------------------------- /packages/sdk/phone-utils/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | 4 | /tsconfig.json 5 | /test 6 | /src 7 | **.test.js -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './aws-hsm-signer' 2 | export * from './aws-hsm-wallet' 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './gcp-hsm-signer' 2 | export * from './gcp-hsm-wallet' 3 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ledger-signer' 2 | export * from './ledger-wallet' 3 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | 5 | bash scripts/hooks/prereleasecheck.sh 6 | -------------------------------------------------------------------------------- /packages/cli/src/test-utils/setupAfterEnv.ts: -------------------------------------------------------------------------------- 1 | afterEach(() => { 2 | jest.clearAllTimers() 3 | jest.clearAllMocks() 4 | }) 5 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/src/index.ts: -------------------------------------------------------------------------------- 1 | export { Claim, createNameClaim } from './claim' 2 | export * from './metadata' 3 | -------------------------------------------------------------------------------- /packages/core/src/governing/index.ts: -------------------------------------------------------------------------------- 1 | export { voteProposal, type VoteProposalAdapter, type VoteProposalTypes } from './vote.js' 2 | -------------------------------------------------------------------------------- /packages/sdk/explorer/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base' 2 | export * from './block-explorer' 3 | export * from './log-explorer' 4 | -------------------------------------------------------------------------------- /packages/cli/src/scripts/postinstall.ts: -------------------------------------------------------------------------------- 1 | import { printTelemetryInformation } from '../utils/telemetry' 2 | 3 | printTelemetryInformation() 4 | -------------------------------------------------------------------------------- /packages/sdk/base/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/utils/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/governance/src/test-utils/setup.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalSetup() { 2 | console.info('Global setup Complete') 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/phone-utils/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/globals.d.ts: -------------------------------------------------------------------------------- 1 | import { FetchMockSandbox } from 'fetch-mock' 2 | 3 | declare global { 4 | const fetchMock: FetchMockSandbox 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts'], 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/explorer/src/globals.d.ts: -------------------------------------------------------------------------------- 1 | import { FetchMockSandbox } from 'fetch-mock' 2 | 3 | declare global { 4 | const fetchMock: FetchMockSandbox 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/test-utils/ganache.teardown.d.ts: -------------------------------------------------------------------------------- 1 | import teardown from '@celo/dev-utils/lib/ganache-teardown'; 2 | export default teardown; 3 | -------------------------------------------------------------------------------- /packages/sdk/connect/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts'], 4 | verbose: true, 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/governance/src/test-utils/globals.d.ts: -------------------------------------------------------------------------------- 1 | import { FetchMockSandbox } from 'fetch-mock' 2 | 3 | declare global { 4 | const fetchMock: FetchMockSandbox 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './azure-hsm-signer' 2 | export * from './azure-hsm-wallet' 3 | export * from './azure-key-vault-client' 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn fmt --staged --no-errors-on-unmatched 5 | 6 | bash scripts/hooks/prereleasecheck.sh 7 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/index/README.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../README.md) / index 6 | 7 | # index 8 | -------------------------------------------------------------------------------- /packages/cli/src/utils/lockedgold.ts: -------------------------------------------------------------------------------- 1 | export const LockedGoldArgs = { 2 | valueArg: { 3 | name: 'value', 4 | description: 'The unit amount of CELO', 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './account' 2 | export * from './bls' 3 | export * from './commentEncryption' 4 | export * from './dataEncryptionKey' 5 | -------------------------------------------------------------------------------- /packages/sdk/keystores/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/cli/bin/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | ;(async () => { 4 | const oclif = require('@oclif/core') 5 | await oclif.execute({ development: false, dir: __dirname }) 6 | })() 7 | -------------------------------------------------------------------------------- /packages/sdk/keystores/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './file-keystore' 2 | export * from './inmemory-keystore' 3 | export * from './keystore-base' 4 | export * from './keystore-wallet-wrapper' 5 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,+CAA4B"} -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | compressionLevel: mixed 2 | 3 | enableGlobalCache: false 4 | 5 | nodeLinker: node-modules 6 | 7 | yarnPath: .yarn/releases/yarn-4.0.2.cjs 8 | 9 | checksumBehavior: update 10 | -------------------------------------------------------------------------------- /docs/sdk/wallet-remote/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-remote v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-remote v8.0.2 6 | 7 | ## Classes 8 | 9 | - [RemoteWallet](classes/RemoteWallet.md) 10 | -------------------------------------------------------------------------------- /packages/actions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "dist/mjs", 6 | "target": "esnext" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "dist/mjs", 6 | "target": "esnext" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/future.ts: -------------------------------------------------------------------------------- 1 | // Exports moved to @celo/base, forwarding them 2 | // here for backwards compatibility 3 | export { Future, pipeToFuture, toFuture } from '@celo/base/lib/future' 4 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/tsconfig-cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "dist/cjs", 6 | "target": "es2015" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/dev-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "dist/mjs", 6 | "target": "esnext" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/actions/tsconfig-cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "dist/cjs", 6 | "target": "es2015" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/dev-utils/tsconfig-cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "dist/cjs", 6 | "target": "es2015" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *-debug.log 2 | *-error.log 3 | /.nyc_output 4 | /dist 5 | /lib 6 | /tmp 7 | .tmp/ 8 | node_modules 9 | oclif.manifest.json 10 | src/generated 11 | .devchain/ 12 | .devchain.tar.gz 13 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/logger.ts: -------------------------------------------------------------------------------- 1 | // Exports moved to @celo/base, forwarding them 2 | // here for backwards compatibility 3 | export { consoleLogger, Logger, noopLogger, prefixLogger } from '@celo/base/lib/logger' 4 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "dist/mjs", 6 | "target": "esnext" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/utils/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | /tsconfig.json 4 | /test 5 | /src 6 | 7 | # exclude ts files and sourcemaps 8 | *.map 9 | *.ts 10 | 11 | # include the .d.ts files 12 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/viem-account-ledger/tsconfig-cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "dist/cjs", 6 | "target": "es2015" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | singleQuote: true, 4 | trailingComma: 'es5', 5 | arrowParens: 'always', 6 | printWidth: 100, 7 | tabWidth: 2, 8 | bracketSpacing: true, 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/docs/globals.md: -------------------------------------------------------------------------------- 1 | [**@celo/core v0.0.2**](README.md) 2 | 3 | *** 4 | 5 | # @celo/core v0.0.2 6 | 7 | ## Functions 8 | 9 | - [vote](functions/vote.md) 10 | - [voteProposal](functions/voteProposal.md) 11 | -------------------------------------------------------------------------------- /packages/sdk/base/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | /tsconfig.json 4 | /test 5 | /src 6 | 7 | # exclude ts files and sourcemaps 8 | *.map 9 | *.ts 10 | 11 | # include the .d.ts files 12 | !lib/**/*.d.ts 13 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/.env.example: -------------------------------------------------------------------------------- 1 | GOOGLE_APPLICATION_CREDENTIALS= 2 | GCP_VERSION_NAME= 3 | -------------------------------------------------------------------------------- /packages/actions/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './client.js' 2 | export { ContractName } from './contract-name.js' 3 | export { resolveAddress } from './contracts/registry.js' 4 | export { getGasPriceOnCelo } from './rpc-methods.js' 5 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>celo-org/.github:renovate-config", 5 | "local>celo-org/developer-tooling:dt-renovate-base" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/explorer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src/**/*", "types/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/keystores/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src/**/*", "types/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /docs/sdk/wallet-local/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-local v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-local v8.0.2 6 | 7 | ## Classes 8 | 9 | - [LocalSigner](classes/LocalSigner.md) 10 | - [LocalWallet](classes/LocalWallet.md) 11 | -------------------------------------------------------------------------------- /packages/actions/docs/modules.md: -------------------------------------------------------------------------------- 1 | [**@Celo/Actions v0.2.1**](README.md) 2 | 3 | *** 4 | 5 | # @Celo/Actions v0.2.1 6 | 7 | ## Modules 8 | 9 | - [multicontract-interactions/stake](multicontract-interactions/stake/README.md) 10 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | 4 | /tsconfig.json 5 | /test 6 | /src 7 | 8 | # exclude ts files and sourcemaps 9 | *.map 10 | *.ts 11 | 12 | # include the .d.ts files 13 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/test-utils/ganache.teardown.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ganache.teardown.js","sourceRoot":"","sources":["../../src/test-utils/ganache.teardown.ts"],"names":[],"mappings":";;;;;AAAA,4FAA2D;AAC3D,kBAAe,0BAAQ,CAAA"} -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm-aws/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-hsm-aws v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-hsm-aws v8.0.2 6 | 7 | ## Classes 8 | 9 | - [AwsHsmSigner](classes/AwsHsmSigner.md) 10 | - [AwsHsmWallet](classes/AwsHsmWallet.md) 11 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm-gcp/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-hsm-gcp v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-hsm-gcp v8.0.2 6 | 7 | ## Classes 8 | 9 | - [GcpHsmSigner](classes/GcpHsmSigner.md) 10 | - [GcpHsmWallet](classes/GcpHsmWallet.md) 11 | -------------------------------------------------------------------------------- /packages/cli/src/utils/notice.ts: -------------------------------------------------------------------------------- 1 | import { Deprecation } from '@oclif/core/lib/interfaces' 2 | 3 | export const deprecationOptions: Deprecation = { 4 | message: 'DKG is Deprecated. Please reach out to us if you believe it should not be', 5 | } 6 | -------------------------------------------------------------------------------- /packages/cli/dev-guide.md: -------------------------------------------------------------------------------- 1 | 2 | # Developer Guide for CLI 3 | 4 | * Things to note * 5 | 6 | ## Terminology 7 | 8 | ``` 9 | # bin topic command flag 10 | ^ ^ ^ ^ 11 | celocli governance:show --help 12 | ``` 13 | -------------------------------------------------------------------------------- /packages/sdk/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "exclude": ["**/*.test.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/explorer/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 4 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/jestSetup.ts'], 5 | verbose: true, 6 | } 7 | -------------------------------------------------------------------------------- /docs/sdk/network-utils/README.md: -------------------------------------------------------------------------------- 1 | **@celo/network-utils v5.0.9** 2 | 3 | *** 4 | 5 | # @celo/network-utils v5.0.9 6 | 7 | ## Classes 8 | 9 | - [GenesisBlockUtils](classes/GenesisBlockUtils.md) 10 | - [StaticNodeUtils](classes/StaticNodeUtils.md) 11 | -------------------------------------------------------------------------------- /packages/cli/bin/dev.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node_modules/.bin/ts-node 2 | ;(async () => { 3 | const oclif = await import('@oclif/core') 4 | console.info('Running in development mode') 5 | await oclif.execute({ development: false, dir: __dirname }) 6 | })() 7 | -------------------------------------------------------------------------------- /packages/sdk/base/src/currencies.ts: -------------------------------------------------------------------------------- 1 | export enum StableToken { 2 | USDm = 'USDm', 3 | EURm = 'EURm', 4 | BRLm = 'BRLm', 5 | } 6 | 7 | export enum Token { 8 | CELO = 'CELO', 9 | } 10 | 11 | export type CeloTokenType = StableToken | Token 12 | -------------------------------------------------------------------------------- /packages/sdk/connect/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "exclude": ["**/*.test.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils -------------------------------------------------------------------------------- /packages/actions/src/multicontract-interactions/stake/index.ts: -------------------------------------------------------------------------------- 1 | export { ElectedRpcNode, getElectedRpcNodes } from './elected-rpc-nodes.js' 2 | export { getRegisteredStakingGroups, getRegisteredValidatorGroups } from './staking-groups.js' 3 | export { vote } from './vote.js' 4 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/inputValidation.ts: -------------------------------------------------------------------------------- 1 | // Exports moved to @celo/base, forwarding them 2 | // here for backwards compatibility 3 | export { 4 | BaseProps, 5 | validateDecimal, 6 | validateInteger, 7 | ValidatorKind, 8 | } from '@celo/base/lib/inputValidation' 9 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/type-aliases/Address.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / Address 6 | 7 | # Type Alias: Address 8 | 9 | > **Address** = `string` 10 | 11 | Defined in: base/lib/address.d.ts:2 12 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | collectCoverageFrom: ['**/src/**/*.ts', '!**/*.d.ts', '!**/test-utils/*.ts'], 3 | moduleFileExtensions: ['ts', 'js', 'json', 'node'], 4 | testMatch: ['**/?(*.)(spec|test).ts'], 5 | transform: { 6 | '\\.ts$': 'ts-jest', 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /packages/actions/.npmignore: -------------------------------------------------------------------------------- 1 | 2 | /coverage/ 3 | /node_modules/ 4 | /src/ 5 | /tmp/ 6 | /.tmp/ 7 | 8 | /tsconfig.* 9 | *.tgz 10 | 11 | /src 12 | /scripts 13 | tsconfig.json 14 | tsconfig-*.json 15 | 16 | /dist/**/*.test.* 17 | 18 | typedoc.json 19 | vitest.config.ts 20 | -------------------------------------------------------------------------------- /packages/sdk/governance/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | 10 | /tsconfig.* 11 | /jest.config.* 12 | *.tgz 13 | 14 | typedoc.json 15 | 16 | /src 17 | 18 | /lib/**/*.test.* 19 | /lib/test-utils -------------------------------------------------------------------------------- /packages/sdk/utils/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as AddressUtils from './address' 2 | export { ECIES } from './ecies' 3 | export { IstanbulUtils } from './istanbul' 4 | export { SignatureUtils } from './signatureUtils' 5 | export { StringUtils } from './string' 6 | export { AddressUtils } 7 | -------------------------------------------------------------------------------- /docs/sdk/transactions-uri/README.md: -------------------------------------------------------------------------------- 1 | **@celo/transactions-uri v5.0.15** 2 | 3 | *** 4 | 5 | # @celo/transactions-uri v5.0.15 6 | 7 | ## Functions 8 | 9 | - [buildUri](functions/buildUri.md) 10 | - [parseUri](functions/parseUri.md) 11 | - [QrFromUri](functions/QrFromUri.md) 12 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "references": [{ "path": "../../utils" }] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "references": [{ "path": "../../utils" }] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "references": [{ "path": "../../utils" }] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src", "types"], 8 | "references": [{ "path": "../../utils" }] 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/DEVELOP.md: -------------------------------------------------------------------------------- 1 | # Developer Guide 2 | 3 | ## Running Tests 4 | 5 | ### All tests 6 | 7 | `yarn test` 8 | 9 | #### CI 10 | 11 | There is CI equivalent of the `test` commands that supply ` --workerIdleMemoryLimit=0.1` flag that is required for tests to work in CI environment. 12 | -------------------------------------------------------------------------------- /packages/core/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | typedoc.json 19 | vitest.config.ts 20 | -------------------------------------------------------------------------------- /packages/sdk/explorer/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | 10 | /tsconfig.* 11 | /jest.config.* 12 | *.tgz 13 | 14 | /src 15 | 16 | typedoc.json 17 | jestSetup.ts 18 | 19 | /lib/**/*.test.* 20 | /lib/test-utils -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | /tsconfig.json 4 | /test 5 | /src 6 | 7 | tsconfig.tsbuildinfo 8 | jest.config.js 9 | typedoc.json 10 | 11 | # exclude ts files and sourcemaps 12 | *.map 13 | *.ts 14 | 15 | # include the .d.ts files 16 | !lib/**/*.d.ts 17 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | typedoc.json 16 | jestSetup.ts 17 | 18 | /lib/**/*.test.* 19 | /lib/test-utils -------------------------------------------------------------------------------- /packages/typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@celo/typescript", 3 | "version": "0.0.1", 4 | "description": "typescript configuration", 5 | "author": "Celo", 6 | "license": "Apache-2.0", 7 | "main": "tsconfig.json", 8 | "scripts": { 9 | "build-rules": "tsc" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/dev-utils/src/describeEach.ts: -------------------------------------------------------------------------------- 1 | export interface TestCase { 2 | label: string 3 | } 4 | 5 | export function describeEach(testCases: T[], fn: (testCase: T) => void) { 6 | for (const testCase of testCases) { 7 | describe(testCase.label, () => fn(testCase)) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/governance/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(test).ts'], 4 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/jest_setup.ts'], 5 | globalSetup: '/src/test-utils/setup.global.ts', 6 | verbose: true, 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/governance/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "moduleResolution": "node16", 5 | "module": "Node16", 6 | "rootDir": "src", 7 | "outDir": "lib" 8 | }, 9 | "include": ["src/**/*", "types/**/*"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | typedoc.json 19 | vitest.config.ts 20 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/NULL_ADDRESS.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / NULL\_ADDRESS 6 | 7 | # Variable: NULL\_ADDRESS 8 | 9 | > `const` **NULL\_ADDRESS**: `` `0x${string}` `` 10 | 11 | Defined in: base/lib/address.d.ts:14 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm-azure/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-hsm-azure v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-hsm-azure v8.0.2 6 | 7 | ## Classes 8 | 9 | - [AzureHSMSigner](classes/AzureHSMSigner.md) 10 | - [AzureHSMWallet](classes/AzureHSMWallet.md) 11 | - [AzureKeyVaultClient](classes/AzureKeyVaultClient.md) 12 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/async.ts: -------------------------------------------------------------------------------- 1 | // Exports moved to @celo/base, forwarding them 2 | // here for backwards compatibility 3 | export { 4 | concurrentMap, 5 | concurrentValuesMap, 6 | retryAsync, 7 | retryAsyncWithBackOff, 8 | selectiveRetryAsyncWithBackOff, 9 | sleep, 10 | } from '@celo/base/lib/async' 11 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src"], 8 | "exclude": ["**/*.test.ts"], 9 | "references": [{ "path": "../../utils" }] 10 | } 11 | -------------------------------------------------------------------------------- /packages/dev-utils/README.md: -------------------------------------------------------------------------------- 1 | # packages/dev-utils 2 | 3 | This is a `utils` package that is meant to be used as a devDependency. It's primary use case is to reuse the anvil setup currently present in `cli` and `contractkit`. 4 | 5 | The version of anvil you use should be the same as the version that generates the devchain. 6 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib" 6 | }, 7 | "include": ["src", "types"], 8 | "exclude": ["**/*.test.ts"], 9 | "references": [{ "path": "../../utils" }] 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib", 6 | "module": "Node16", 7 | "moduleResolution": "node16" 8 | }, 9 | "include": ["src/**/*"], 10 | "exclude": ["**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Github Discussions 4 | url: https://github.com/celo-org/developer-tooling/discussions 5 | about: Please ask and answer questions here. 6 | - name: Docs 7 | url: https://docs.celo.org/ 8 | about: Documentation on the Celo Platform 9 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/src/constants.ts: -------------------------------------------------------------------------------- 1 | import { CELO_DERIVATION_PATH_BASE, ETHEREUM_DERIVATION_PATH } from '@celo/base' 2 | 3 | export const CIP64_PREFIX = '0x7b' 4 | export const CELO_BASE_DERIVATION_PATH = `${CELO_DERIVATION_PATH_BASE.slice(2)}/0` 5 | export const DEFAULT_DERIVATION_PATH = `${ETHEREUM_DERIVATION_PATH.slice(2)}/0` 6 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/string.ts: -------------------------------------------------------------------------------- 1 | import { appendPath, normalizeAccents } from '@celo/base/lib/string' 2 | // Exports moved to @celo/base, forwarding them 3 | // here for backwards compatibility 4 | export { appendPath, normalizeAccents } from '@celo/base/lib/string' 5 | export const StringUtils = { 6 | appendPath, 7 | normalizeAccents, 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib", 6 | "downlevelIteration": true, 7 | "resolveJsonModule": true 8 | }, 9 | "include": ["src/", "src/**/*.json"], 10 | "exclude": ["**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/type-aliases/Address.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / Address 6 | 7 | # Type Alias: Address 8 | 9 | > **Address** = `string` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:2 12 | -------------------------------------------------------------------------------- /packages/sdk/connect/.npmignore: -------------------------------------------------------------------------------- 1 | /coverage/ 2 | /node_modules/ 3 | /src/ 4 | /tmp/ 5 | /.tmp/ 6 | /tsconfig.* 7 | /jest.config.* 8 | *.tgz 9 | 10 | /src 11 | 12 | /lib/**/*.test.* 13 | /lib/test-utils 14 | 15 | typedoc.json 16 | 17 | # exclude ts files and sourcemaps 18 | *.map 19 | *.ts 20 | 21 | # include the .d.ts files 22 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib", 6 | "module": "Node16", 7 | "moduleResolution": "node16" 8 | }, 9 | "include": ["src/**/*", "types/**/*"], 10 | "exclude": ["**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | # For details on acceptable file patterns, please refer to the [Github Documentation](https://help.github.com/articles/about-codeowners/) 4 | 5 | # default owners, overridden by package specific owners below 6 | * @celo-org/devtooling -------------------------------------------------------------------------------- /packages/sdk/governance/jest_setup.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'node:url' 2 | // @ts-ignore 3 | global.URL = URL 4 | 5 | // @ts-ignore 6 | const fetchMock = require('fetch-mock') 7 | 8 | const fetchMockSandbox = fetchMock.sandbox() 9 | jest.mock('cross-fetch', () => fetchMockSandbox) 10 | 11 | // @ts-ignore 12 | global.fetchMock = fetchMockSandbox 13 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/Address.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Address 6 | 7 | # Type Alias: Address 8 | 9 | > **Address** = `string` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L3) 12 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/jest_setup.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'node:url' 2 | 3 | // @ts-ignore 4 | global.URL = URL 5 | 6 | // @ts-ignore 7 | const fetchMock = require('fetch-mock') 8 | 9 | const fetchMockSandbox = fetchMock.sandbox() 10 | jest.mock('cross-fetch', () => fetchMockSandbox) 11 | 12 | // @ts-ignore 13 | global.fetchMock = fetchMockSandbox 14 | -------------------------------------------------------------------------------- /packages/sdk/explorer/jestSetup.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'node:url' 2 | 3 | // @ts-ignore 4 | global.URL = URL 5 | 6 | // @ts-ignore 7 | const fetchMock = require('fetch-mock') 8 | 9 | const fetchMockSandbox = fetchMock.sandbox() 10 | jest.mock('cross-fetch', () => fetchMockSandbox) 11 | 12 | // @ts-ignore 13 | global.fetchMock = fetchMockSandbox 14 | -------------------------------------------------------------------------------- /packages/sdk/phone-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib", 6 | "downlevelIteration": true, 7 | "resolveJsonModule": true 8 | }, 9 | "include": ["src/**/*.ts", "src/**/*.json"], 10 | "exclude": ["src/**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/src/index.ts: -------------------------------------------------------------------------------- 1 | export { CELO_BASE_DERIVATION_PATH, DEFAULT_DERIVATION_PATH } from './constants.js' 2 | export { deriveLedgerAccounts } from './derive-ledger-accounts.js' 3 | export { ledgerToAccount } from './ledger-to-account.js' 4 | export { ledgerToWalletClient } from './ledger-to-wallet-client.js' 5 | export * from './types.js' 6 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/URL_REGEX.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / URL\_REGEX 6 | 7 | # Variable: URL\_REGEX 8 | 9 | > `const` **URL\_REGEX**: `RegExp` 10 | 11 | Defined in: [packages/sdk/base/src/io.ts:2](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/io.ts#L2) 12 | -------------------------------------------------------------------------------- /docs/sdk/governance/variables/debug.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / debug 6 | 7 | # Variable: debug 8 | 9 | > `const` **debug**: `Debugger` 10 | 11 | Defined in: [proposals.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L26) 12 | -------------------------------------------------------------------------------- /packages/cli/src/test-utils/setup.global.ts: -------------------------------------------------------------------------------- 1 | export default async function globalSetup() { 2 | // it is necessary to disabled oclif integration with ts-node as 3 | // together it leads to a silent signit error and exit when tsconfk is loaded. 4 | // @ts-ignore - because global this doesnt have oclif property 5 | global.oclif = { tsnodeEnabled: false } 6 | } 7 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "lib", 6 | "downlevelIteration": true, 7 | "resolveJsonModule": true 8 | }, 9 | "include": ["src/**/*.ts", "src/**/*.json"], 10 | "exclude": ["**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/jestSetup.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'node:url' 2 | 3 | // @ts-ignore 4 | global.URL = URL 5 | 6 | // @ts-ignore 7 | const fetchMock = require('fetch-mock') 8 | 9 | const fetchMockSandbox = fetchMock.sandbox() 10 | jest.mock('cross-fetch', () => fetchMockSandbox) 11 | 12 | // @ts-ignore 13 | global.fetchMock = fetchMockSandbox 14 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/jestSetup.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'node:url' 2 | 3 | // @ts-ignore 4 | global.URL = URL 5 | 6 | // @ts-ignore 7 | const fetchMock = require('fetch-mock') 8 | 9 | const fetchMockSandbox = fetchMock.sandbox() 10 | jest.mock('cross-fetch', () => fetchMockSandbox) 11 | 12 | // @ts-ignore 13 | global.fetchMock = fetchMockSandbox 14 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/task.ts: -------------------------------------------------------------------------------- 1 | // Exports moved to @celo/base, forwarding them 2 | // here for backwards compatibility 3 | export { 4 | conditionWatcher, 5 | repeatTask, 6 | RepeatTaskContext, 7 | RetryTaskOptions, 8 | RunningTask, 9 | RunningTaskWithValue, 10 | TaskOptions, 11 | tryObtainValueWithRetries, 12 | } from '@celo/base/lib/task' 13 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/Hex.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / Hex 6 | 7 | # Type Alias: Hex 8 | 9 | > **Hex** = `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L13) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/Address.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / Address 6 | 7 | # Type Alias: Address 8 | 9 | > **Address** = `string` 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L11) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/enumerations/Token.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / Token 6 | 7 | # Enumeration: Token 8 | 9 | Defined in: base/lib/currencies.d.ts:6 10 | 11 | ## Enumeration Members 12 | 13 | ### CELO 14 | 15 | > **CELO**: `"CELO"` 16 | 17 | Defined in: base/lib/currencies.d.ts:7 18 | -------------------------------------------------------------------------------- /packages/actions/docs/multicontract-interactions/stake/README.md: -------------------------------------------------------------------------------- 1 | [**@Celo/Actions v0.2.1**](../../README.md) 2 | 3 | *** 4 | 5 | [@Celo/Actions](../../modules.md) / multicontract-interactions/stake 6 | 7 | # multicontract-interactions/stake 8 | 9 | ## Functions 10 | 11 | - [getElectedRpcNodes](functions/getElectedRpcNodes.md) 12 | - [vote](functions/vote.md) 13 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/HexString.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / HexString 6 | 7 | # Type Alias: HexString 8 | 9 | > **HexString** = `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/string.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/string.ts#L19) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/type-aliases/CeloTokenType.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / CeloTokenType 6 | 7 | # Type Alias: CeloTokenType 8 | 9 | > **CeloTokenType** = [`StableToken`](../enumerations/StableToken.md) \| [`Token`](../enumerations/Token.md) 10 | 11 | Defined in: base/lib/currencies.d.ts:9 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/verify/README.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../README.md) / verify 6 | 7 | # verify 8 | 9 | ## Functions 10 | 11 | - [verifyAccountClaim](functions/verifyAccountClaim.md) 12 | - [verifyClaim](functions/verifyClaim.md) 13 | - [verifyDomainRecord](functions/verifyDomainRecord.md) 14 | -------------------------------------------------------------------------------- /packages/sdk/base/src/io.ts: -------------------------------------------------------------------------------- 1 | // from http://urlregex.com/ 2 | export const URL_REGEX = new RegExp( 3 | /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/ 4 | ) 5 | /** @internal */ 6 | export const isValidUrl = (url: string) => URL_REGEX.test(url) 7 | -------------------------------------------------------------------------------- /packages/sdk/keystores/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | # exclude ts files and sourcemaps 19 | *.map 20 | *.ts 21 | 22 | # include the .d.ts files 23 | !lib/**/*.d.ts 24 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/celoHistory.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js' 2 | 3 | const WEI_PER_UNIT = 1000000000000000000 4 | 5 | // A small amount returns a rate closer to the median rate 6 | export const DOLLAR_AMOUNT_FOR_ESTIMATE = new BigNumber(0.01 * WEI_PER_UNIT) // 0.01 dollar 7 | export const CELO_AMOUNT_FOR_ESTIMATE = new BigNumber(0.01 * WEI_PER_UNIT) // 0.01 celo 8 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/NULL_ADDRESS.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / NULL\_ADDRESS 6 | 7 | # Variable: NULL\_ADDRESS 8 | 9 | > `const` **NULL\_ADDRESS**: `` `0x${string}` `` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:14 12 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)test.ts'], 4 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/jestSetup.ts'], 5 | // globalSetup: '/src/test-utils/setup.global.ts', 6 | // globalTeardown: '/src/test-utils/teardown.global.ts', 7 | verbose: true, 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | # exclude ts files and sourcemaps 19 | *.map 20 | *.ts 21 | 22 | # include the .d.ts files 23 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | # exclude ts files and sourcemaps 19 | *.map 20 | *.ts 21 | 22 | # include the .d.ts files 23 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /docs/sdk/base/variables/POP_SIZE.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / POP\_SIZE 6 | 7 | # Variable: POP\_SIZE 8 | 9 | > `const` **POP\_SIZE**: `65` = `65` 10 | 11 | Defined in: [packages/sdk/base/src/signatureUtils.ts:1](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/signatureUtils.ts#L1) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/README.md: -------------------------------------------------------------------------------- 1 | **@celo/metadata-claims v1.0.4** 2 | 3 | *** 4 | 5 | # @celo/metadata-claims v1.0.4 6 | 7 | ## Modules 8 | 9 | - [account](account/README.md) 10 | - [claim](claim/README.md) 11 | - [index](index/README.md) 12 | - [keybase](keybase/README.md) 13 | - [metadata](metadata/README.md) 14 | - [types](types/README.md) 15 | - [verify](verify/README.md) 16 | -------------------------------------------------------------------------------- /packages/actions/tsconfig-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": "src", 4 | "declaration": true, 5 | "esModuleInterop": true, 6 | "types": ["node"], 7 | "lib": ["esnext"], 8 | "skipLibCheck": true, 9 | "strict": true, 10 | "moduleResolution": "node" 11 | }, 12 | "include": ["src/**/*"], 13 | "exclude": ["**/*.test.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/cli/src/utils/fee-currency.ts: -------------------------------------------------------------------------------- 1 | import { ContractKit } from '@celo/contractkit' 2 | import { FeeCurrencyDirectoryWrapper } from '@celo/contractkit/lib/wrappers/FeeCurrencyDirectoryWrapper' 3 | 4 | export const getFeeCurrencyContractWrapper = async ( 5 | kit: ContractKit 6 | ): Promise => { 7 | return await kit.contracts.getFeeCurrencyDirectory() 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/test-utils/AlphabeticSequencer.js: -------------------------------------------------------------------------------- 1 | const Sequencer = require('@jest/test-sequencer').default 2 | 3 | class AlphabeticSequencer extends Sequencer { 4 | sort(tests) { 5 | const copyTests = Array.from(tests) 6 | return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1)) 7 | } 8 | } 9 | 10 | module.exports = AlphabeticSequencer 11 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts?(x)'], 4 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/jestSetup.ts'], 5 | globalSetup: '/src/test-utils/setup.global.ts', 6 | globalTeardown: '/src/test-utils/teardown.global.ts', 7 | verbose: true, 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | # exclude ts files and sourcemaps 19 | *.map 20 | *.ts 21 | 22 | # include the .d.ts files 23 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | 19 | # exclude ts files and sourcemaps 20 | *.map 21 | *.ts 22 | 23 | # include the .d.ts files 24 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | /src 14 | 15 | /lib/**/*.test.* 16 | /lib/test-utils 17 | 18 | 19 | # exclude ts files and sourcemaps 20 | *.map 21 | *.ts 22 | 23 | # include the .d.ts files 24 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /scripts/post-build.mjs: -------------------------------------------------------------------------------- 1 | import { writeFileSync } from 'node:fs' 2 | import path from 'node:path' 3 | 4 | const __dirname = process.cwd() 5 | const DIST = path.resolve(__dirname, 'dist') 6 | writeFileSync(path.join(DIST, 'mjs', 'package.json'), JSON.stringify({ type: 'module' }, null, 4)) 7 | writeFileSync(path.join(DIST, 'cjs', 'package.json'), JSON.stringify({ type: 'commonjs' }, null, 4)) 8 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/StrongAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / StrongAddress 6 | 7 | # Type Alias: StrongAddress 8 | 9 | > **StrongAddress** = `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L5) 12 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/NULL_ADDRESS.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / NULL\_ADDRESS 6 | 7 | # Variable: NULL\_ADDRESS 8 | 9 | > `const` **NULL\_ADDRESS**: `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L32) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/README.md: -------------------------------------------------------------------------------- 1 | **@celo/utils v8.0.3** 2 | 3 | *** 4 | 5 | # @celo/utils v8.0.3 6 | 7 | ## Namespaces 8 | 9 | - [AddressUtils](@celo/namespaces/AddressUtils/README.md) 10 | 11 | ## Variables 12 | 13 | - [ECIES](variables/ECIES.md) 14 | - [IstanbulUtils](variables/IstanbulUtils.md) 15 | - [SignatureUtils](variables/SignatureUtils.md) 16 | - [StringUtils](variables/StringUtils.md) 17 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/variables/sixtyFour.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / sixtyFour 6 | 7 | # Variable: sixtyFour 8 | 9 | > `const` **sixtyFour**: `number` = `64` 10 | 11 | Defined in: [signature-utils.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L10) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/variables/thirtyTwo.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / thirtyTwo 6 | 7 | # Variable: thirtyTwo 8 | 9 | > `const` **thirtyTwo**: `number` = `32` 10 | 11 | Defined in: [signature-utils.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L11) 12 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | 10 | /tsconfig.* 11 | /jest.config.* 12 | *.tgz 13 | 14 | /src 15 | 16 | /lib/**/*.test.* 17 | /lib/test-utils 18 | 19 | typedoc.json 20 | # exclude ts files and sourcemaps 21 | *.map 22 | *.ts 23 | 24 | # include the .d.ts files 25 | !lib/**/*.d.ts 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/issue-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Add a New Issue 3 | about: Use this template raise an issue in the Celo Developer Tooling Repo. 4 | title: "[Issue Title]" 5 | labels: 6 | assignees: @celo-org/devtooling 7 | --- 8 | 9 | 10 | ### Expected Behavior 11 | 12 | Please describe the behavior you are expecting 13 | 14 | ### Current Behavior 15 | 16 | What is the current behavior? 17 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/PROXY_ABI.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / PROXY\_ABI 6 | 7 | # Variable: PROXY\_ABI 8 | 9 | > `const` **PROXY\_ABI**: `ABIDefinition`[] 10 | 11 | Defined in: [contractkit/src/proxy.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L102) 12 | -------------------------------------------------------------------------------- /docs/sdk/governance/variables/hotfixExecuteAbi.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / hotfixExecuteAbi 6 | 7 | # Variable: hotfixExecuteAbi 8 | 9 | > `const` **hotfixExecuteAbi**: `AbiItem` 10 | 11 | Defined in: [proposals.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L28) 12 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | typedoc.json 14 | 15 | /src 16 | 17 | /lib/**/*.test.* 18 | /lib/test-utils 19 | 20 | # exclude ts files and sourcemaps 21 | *.map 22 | *.ts 23 | 24 | # include the .d.ts files 25 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/.npmignore: -------------------------------------------------------------------------------- 1 | /.devchain/ 2 | /.devchain.tar.gz 3 | /coverage/ 4 | /node_modules/ 5 | /src/ 6 | /tmp/ 7 | /.tmp/ 8 | 9 | /tsconfig.* 10 | /jest.config.* 11 | *.tgz 12 | 13 | typedoc.json 14 | 15 | /src 16 | 17 | /lib/**/*.test.* 18 | /lib/test-utils 19 | 20 | # exclude ts files and sourcemaps 21 | *.map 22 | *.ts 23 | 24 | # include the .d.ts files 25 | !lib/**/*.d.ts -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/DerivationPath.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / DerivationPath 6 | 7 | # Type Alias: DerivationPath 8 | 9 | > **DerivationPath** = `` `m/44'/${string}'/${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/account.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/account.ts#L5) 12 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/variables/CELO_DERIVATION_PATH_BASE.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / CELO\_DERIVATION\_PATH\_BASE 6 | 7 | # Variable: CELO\_DERIVATION\_PATH\_BASE 8 | 9 | > `const` **CELO\_DERIVATION\_PATH\_BASE**: `"m/44'/52752'/0'"` = `"m/44'/52752'/0'"` 10 | 11 | Defined in: base/lib/account.d.ts:2 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/AccessListRaw.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / AccessListRaw 6 | 7 | # Type Alias: AccessListRaw 8 | 9 | > **AccessListRaw** = \[`string`, `string`[]\][] 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L19) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/HexOrMissing.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / HexOrMissing 6 | 7 | # Type Alias: HexOrMissing 8 | 9 | > **HexOrMissing** = [`Hex`](Hex.md) \| `undefined` 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L21) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/BlockNumber.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / BlockNumber 6 | 7 | # Type Alias: BlockNumber 8 | 9 | > **BlockNumber** = `string` \| `number` \| `BN` \| `BigNumber` \| `"latest"` \| `"pending"` \| `"earliest"` \| `"genesis"` \| `"finalized"` \| `"safe"` 10 | 11 | Defined in: node\_modules/web3-core/types/index.d.ts:442 12 | -------------------------------------------------------------------------------- /packages/cli/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts'], 4 | setupFiles: ['/src/test-utils/setup.ts'], 5 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/src/test-utils/setupAfterEnv.ts'], 6 | globalSetup: '/src/test-utils/setup.global.ts', 7 | globalTeardown: '/src/test-utils/teardown.global.ts', 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/src/test-utils/setup.ts: -------------------------------------------------------------------------------- 1 | jest.mock('@ledgerhq/hw-transport-node-hid', () => { 2 | return { 3 | default: { 4 | open: jest.fn(() => { 5 | return { 6 | send: jest.fn(() => new Promise(() => {})), 7 | decorateAppAPIMethods: jest.fn(), 8 | close: jest.fn(), 9 | } 10 | }), 11 | }, 12 | } 13 | }) 14 | 15 | process.env.TELEMETRY_ENABLED = '0' 16 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/noopLogger.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / noopLogger 6 | 7 | # Variable: noopLogger 8 | 9 | > `const` **noopLogger**: [`Logger`](../type-aliases/Logger.md) 10 | 11 | Defined in: [packages/sdk/base/src/logger.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/logger.ts#L3) 12 | 13 | **`Internal`** 14 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/variables/sixtyFour.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / sixtyFour 6 | 7 | # Variable: sixtyFour 8 | 9 | > `const` **sixtyFour**: `number` = `64` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:49](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L49) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/variables/thirtyTwo.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / thirtyTwo 6 | 7 | # Variable: thirtyTwo 8 | 9 | > `const` **thirtyTwo**: `number` = `32` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L50) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/variables/publicKeyPrefix.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / publicKeyPrefix 6 | 7 | # Variable: publicKeyPrefix 8 | 9 | > `const` **publicKeyPrefix**: `number` = `0x04` 10 | 11 | Defined in: [signature-utils.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L9) 12 | -------------------------------------------------------------------------------- /docs/sdk/governance/interfaces/RegistryAdditions.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / RegistryAdditions 6 | 7 | # Interface: RegistryAdditions 8 | 9 | Defined in: [proposals.ts:218](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L218) 10 | 11 | ## Indexable 12 | 13 | \[`contractName`: `string`\]: `string` 14 | -------------------------------------------------------------------------------- /docs/sdk/keystores/README.md: -------------------------------------------------------------------------------- 1 | **@celo/keystores v5.0.16** 2 | 3 | *** 4 | 5 | # @celo/keystores v5.0.16 6 | 7 | ## Enumerations 8 | 9 | - [ErrorMessages](enumerations/ErrorMessages.md) 10 | 11 | ## Classes 12 | 13 | - [FileKeystore](classes/FileKeystore.md) 14 | - [InMemoryKeystore](classes/InMemoryKeystore.md) 15 | - [KeystoreBase](classes/KeystoreBase.md) 16 | - [KeystoreWalletWrapper](classes/KeystoreWalletWrapper.md) 17 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/JSONParseErrorType.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / JSONParseErrorType 6 | 7 | # Variable: JSONParseErrorType 8 | 9 | > `const` **JSONParseErrorType**: `"JsonParseError"` = `'JsonParseError'` 10 | 11 | Defined in: [packages/sdk/base/src/result.ts:77](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/result.ts#L77) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/CeloTxWithSig.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / CeloTxWithSig 6 | 7 | # Type Alias: CeloTxWithSig 8 | 9 | > **CeloTxWithSig** = [`WithSig`](WithSig.md)\<[`CeloTx`](CeloTx.md)\> 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L42) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/AllContracts.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / AllContracts 6 | 7 | # Variable: AllContracts 8 | 9 | > `const` **AllContracts**: [`CeloContract`](../enumerations/CeloContract.md)[] 10 | 11 | Defined in: [contractkit/src/base.ts:52](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L52) 12 | -------------------------------------------------------------------------------- /docs/sdk/explorer/variables/getContractDetailsFromContract.md: -------------------------------------------------------------------------------- 1 | [**@celo/explorer v5.0.18**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/explorer](../README.md) / getContractDetailsFromContract 6 | 7 | # Variable: getContractDetailsFromContract 8 | 9 | > `const` **getContractDetailsFromContract**: `any` 10 | 11 | Defined in: [base.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/explorer/src/base.ts#L17) 12 | -------------------------------------------------------------------------------- /packages/cli/homebrew/scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | __dirname=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 6 | 7 | brew update 8 | brew install "$__dirname/../Formula/celocli.rb" 9 | brew test celocli 10 | celocli --version 11 | celocli --help 12 | celocli commands 13 | celocli account:new --language=french 14 | celocli account:new 15 | celocli network:whitelist --node mainnet 16 | -------------------------------------------------------------------------------- /packages/core/tsconfig-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "declaration": true, 6 | "esModuleInterop": true, 7 | "types": ["node"], 8 | "lib": ["esnext"], 9 | "skipLibCheck": true, 10 | "strict": true, 11 | "moduleResolution": "node" 12 | }, 13 | "include": ["src/**/*"], 14 | "exclude": ["**/*.test.ts"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/vitest.config.ts: -------------------------------------------------------------------------------- 1 | // vitest.config.ts 2 | import { coverageConfigDefaults, defineConfig } from 'vitest/config' 3 | 4 | export default defineConfig({ 5 | test: { 6 | server: { 7 | sourcemap: false, 8 | }, 9 | coverage: { 10 | reporter: ['json', 'clover', 'lcov'], 11 | exclude: ['**/data**', '**/tokens**', '**/test-utils**', ...coverageConfigDefaults.exclude], 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/variables/BLS_POP_SIZE.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / BLS\_POP\_SIZE 6 | 7 | # Variable: BLS\_POP\_SIZE 8 | 9 | > `const` **BLS\_POP\_SIZE**: `48` = `48` 10 | 11 | Defined in: [cryptographic-utils/src/bls.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L11) 12 | -------------------------------------------------------------------------------- /docs/sdk/governance/type-aliases/ProposalTxParams.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / ProposalTxParams 6 | 7 | # Type Alias: ProposalTxParams 8 | 9 | > **ProposalTxParams** = `Pick`\<`ProposalTransaction`, `"to"` \| `"value"`\> 10 | 11 | Defined in: [proposals.ts:217](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L217) 12 | -------------------------------------------------------------------------------- /packages/sdk/base/src/logger.ts: -------------------------------------------------------------------------------- 1 | export type Logger = (...args: any[]) => void 2 | /** @internal */ 3 | export const noopLogger: Logger = () => { 4 | /* noop*/ 5 | } 6 | /** @internal */ 7 | export const prefixLogger = (prefix: string, logger: Logger) => { 8 | return logger === noopLogger ? noopLogger : (...args: any[]) => logger(`${prefix}:: `, ...args) 9 | } 10 | /** @internal */ 11 | export const consoleLogger: Logger = console.log 12 | -------------------------------------------------------------------------------- /packages/sdk/connect/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './abi-types' 2 | export * from './connection' 3 | export * from './types' 4 | export * from './utils/abi-utils' 5 | export * from './utils/celo-transaction-object' 6 | export * from './utils/rpc-caller' 7 | export * from './utils/tx-result' 8 | export * from './wallet' 9 | 10 | // still used in some cases 11 | export const PROXY_ADMIN_ADDRESS = '0x4200000000000000000000000000000000000018' 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/functions/getRandomId.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / getRandomId 6 | 7 | # Function: getRandomId() 8 | 9 | > **getRandomId**(): `number` 10 | 11 | Defined in: [packages/sdk/connect/src/utils/rpc-caller.ts:36](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L36) 12 | 13 | ## Returns 14 | 15 | `number` 16 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/variables/publicKeyPrefix.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / publicKeyPrefix 6 | 7 | # Variable: publicKeyPrefix 8 | 9 | > `const` **publicKeyPrefix**: `number` = `0x04` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:48](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L48) 12 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/index.ts: -------------------------------------------------------------------------------- 1 | export { Address, NULL_ADDRESS } from '@celo/base/lib/address' 2 | export { REGISTRY_CONTRACT_ADDRESS } from './address-registry' 3 | export { 4 | AllContracts, 5 | CeloContract, 6 | CeloToken, 7 | CeloTokenContract, 8 | RegisteredContracts, 9 | } from './base' 10 | export { CeloTokenType, CeloTokens, StableToken, Token } from './celo-tokens' 11 | export * from './kit' 12 | export * from './proxy' 13 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/consoleLogger.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / consoleLogger 6 | 7 | # Variable: consoleLogger 8 | 9 | > `const` **consoleLogger**: [`Logger`](../type-aliases/Logger.md) = `console.log` 10 | 11 | Defined in: [packages/sdk/base/src/logger.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/logger.ts#L11) 12 | 13 | **`Internal`** 14 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/type-aliases/HttpProviderOptions.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / HttpProviderOptions 6 | 7 | # Type Alias: HttpProviderOptions 8 | 9 | > **HttpProviderOptions** = `Web3HttpProviderOptions` 10 | 11 | Defined in: [contractkit/src/setupForKits.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/setupForKits.ts#L3) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/GET_IMPLEMENTATION_ABI.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / GET\_IMPLEMENTATION\_ABI 6 | 7 | # Variable: GET\_IMPLEMENTATION\_ABI 8 | 9 | > `const` **GET\_IMPLEMENTATION\_ABI**: `ABIDefinition` 10 | 11 | Defined in: [contractkit/src/proxy.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L34) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/SET_IMPLEMENTATION_ABI.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / SET\_IMPLEMENTATION\_ABI 6 | 7 | # Variable: SET\_IMPLEMENTATION\_ABI 8 | 9 | > `const` **SET\_IMPLEMENTATION\_ABI**: `ABIDefinition` 10 | 11 | Defined in: [contractkit/src/proxy.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L50) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/TRANSFER_OWNERSHIP_ABI.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / TRANSFER\_OWNERSHIP\_ABI 6 | 7 | # Variable: TRANSFER\_OWNERSHIP\_ABI 8 | 9 | > `const` **TRANSFER\_OWNERSHIP\_ABI**: `ABIDefinition` 10 | 11 | Defined in: [contractkit/src/proxy.ts:86](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L86) 12 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/ETHEREUM_DERIVATION_PATH.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / ETHEREUM\_DERIVATION\_PATH 6 | 7 | # Variable: ETHEREUM\_DERIVATION\_PATH 8 | 9 | > `const` **ETHEREUM\_DERIVATION\_PATH**: `"m/44'/60'/0'"` = `"m/44'/60'/0'"` 10 | 11 | Defined in: [packages/sdk/base/src/account.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/account.ts#L3) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/ABIType.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / ABIType 6 | 7 | # Type Alias: ABIType 8 | 9 | > **ABIType** = `"uint256"` \| `"boolean"` \| `"string"` \| `"bytes"` \| `string` 10 | 11 | Defined in: [packages/sdk/connect/src/abi-types.ts:4](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/abi-types.ts#L4) 12 | 13 | **`Internal`** 14 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/CeloTxPending.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / CeloTxPending 6 | 7 | # Type Alias: CeloTxPending 8 | 9 | > **CeloTxPending** = `Transaction` & `Partial`\<[`CeloParams`](../interfaces/CeloParams.md)\> 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L102) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/API_KEY_HEADER_KEY.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / API\_KEY\_HEADER\_KEY 6 | 7 | # Variable: API\_KEY\_HEADER\_KEY 8 | 9 | > `const` **API\_KEY\_HEADER\_KEY**: `"apiKey"` = `'apiKey'` 10 | 11 | Defined in: [contractkit/src/setupForKits.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/setupForKits.ts#L5) 12 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testMatch: ['/src/**/?(*.)+(spec|test).ts'], 4 | setupFilesAfterEnv: ['@celo/dev-utils/matchers', '/jest_setup.ts'], 5 | globalSetup: '/src/test-utils/setup.global.ts', 6 | globalTeardown: '/src/test-utils/teardown.global.ts', 7 | testSequencer: '/src/test-utils/AlphabeticSequencer.js', 8 | verbose: true, 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/test-utils/ganache.setup.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ganache.setup.js","sourceRoot":"","sources":["../../src/test-utils/ganache.setup.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qEAA8D;AAC9D,yDAA6D;AAE7D,SAA8B,KAAK;;QACjC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;QACpC,MAAM,IAAA,0BAAU,EAAC,EAAE,CAAC,CAAA;QACpB,MAAM,IAAA,yBAAe,EAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;IACnC,CAAC;CAAA;AALD,wBAKC"} -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/CeloTokenType.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / CeloTokenType 6 | 7 | # Type Alias: CeloTokenType 8 | 9 | > **CeloTokenType** = [`StableToken`](../enumerations/StableToken.md) \| [`Token`](../enumerations/Token.md) 10 | 11 | Defined in: [packages/sdk/base/src/currencies.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L11) 12 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/variables/E164PhoneNumberType.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / E164PhoneNumberType 6 | 7 | # Variable: E164PhoneNumberType 8 | 9 | > `const` **E164PhoneNumberType**: `Type`\<`string`, `string`, `unknown`\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:6](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L6) 12 | -------------------------------------------------------------------------------- /packages/dev-utils/tsconfig-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": "src", 4 | "declaration": true, 5 | "esModuleInterop": true, 6 | "types": ["node", "@types/jest"], 7 | "lib": ["esnext"], 8 | "skipLibCheck": true, 9 | "strict": true, 10 | "moduleResolution": "node", 11 | "resolveJsonModule": true 12 | }, 13 | "include": ["src/**/*", "src/migration-override.json"], 14 | "exclude": ["**/*.test.ts"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/base/src/phoneNumbers.ts: -------------------------------------------------------------------------------- 1 | export interface ParsedPhoneNumber { 2 | e164Number: string 3 | displayNumber: string 4 | displayNumberInternational: string 5 | countryCode?: number 6 | regionCode?: string 7 | } 8 | 9 | const E164_REGEX = /^\+[1-9][0-9]{1,14}$/ 10 | 11 | export function isE164Number(phoneNumber: string) { 12 | return E164_REGEX.test(phoneNumber) 13 | } 14 | 15 | export const PhoneNumberBase = { 16 | isE164Number, 17 | } 18 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "moduleResolution": "node16", 5 | "module": "Node16", 6 | "rootDir": "src", 7 | "outDir": "lib", 8 | "resolveJsonModule": true 9 | }, 10 | "include": ["src/**/*", "types/**/*", "../../dev-utils/dist/cjs/matchers.d.ts"], 11 | "references": [{ "path": "../utils" }], 12 | "exclude": ["**/*.test.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/CeloTxReceipt.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / CeloTxReceipt 6 | 7 | # Type Alias: CeloTxReceipt 8 | 9 | > **CeloTxReceipt** = `TransactionReceipt` & `Partial`\<[`CeloParams`](../interfaces/CeloParams.md)\> 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:103](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L103) 12 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/TransactionTypes.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / TransactionTypes 6 | 7 | # Type Alias: TransactionTypes 8 | 9 | > **TransactionTypes** = `"ethereum-legacy"` \| `"eip1559"` \| `"cip42"` \| `"cip64"` \| `"cip66"` 10 | 11 | Defined in: [packages/sdk/connect/src/types.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L56) 12 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/RegisteredContracts.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / RegisteredContracts 6 | 7 | # Variable: RegisteredContracts 8 | 9 | > `const` **RegisteredContracts**: [`CeloContract`](../enumerations/CeloContract.md)[] 10 | 11 | Defined in: [contractkit/src/base.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L54) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/metadata/README.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../README.md) / metadata 6 | 7 | # metadata 8 | 9 | ## Classes 10 | 11 | - [IdentityMetadataWrapper](classes/IdentityMetadataWrapper.md) 12 | 13 | ## Type Aliases 14 | 15 | - [IdentityMetadata](type-aliases/IdentityMetadata.md) 16 | 17 | ## Variables 18 | 19 | - [IdentityMetadataType](variables/IdentityMetadataType.md) 20 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/type-aliases/E164Number.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / E164Number 6 | 7 | # Type Alias: E164Number 8 | 9 | > **E164Number** = `t.TypeOf`\<*typeof* [`E164PhoneNumberType`](../variables/E164PhoneNumberType.md)\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L25) 12 | -------------------------------------------------------------------------------- /packages/docs/viem-account-ledger/type-aliases/LedgerAccount.md: -------------------------------------------------------------------------------- 1 | [**@celo/viem-account-ledger v1.2.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/viem-account-ledger](../globals.md) / LedgerAccount 6 | 7 | # Type Alias: LedgerAccount 8 | 9 | > **LedgerAccount** = `LocalAccount`\<`"ledger"`\> 10 | 11 | Defined in: [packages/viem-account-ledger/src/types.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/viem-account-ledger/src/types.ts#L3) 12 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/tsconfig-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@celo/typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "declaration": true, 6 | "esModuleInterop": true, 7 | "types": ["node"], 8 | "lib": ["esnext"], 9 | "skipLibCheck": true, 10 | "strict": true, 11 | "moduleResolution": "node" 12 | }, 13 | "include": ["src/**/*", "types/**/*"], 14 | "exclude": ["**/*.test.ts"] 15 | } 16 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/Logger.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Logger 6 | 7 | # Type Alias: Logger() 8 | 9 | > **Logger** = (...`args`) => `void` 10 | 11 | Defined in: [packages/sdk/base/src/logger.ts:1](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/logger.ts#L1) 12 | 13 | ## Parameters 14 | 15 | ### args 16 | 17 | ...`any`[] 18 | 19 | ## Returns 20 | 21 | `void` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/variables/CELO_DERIVATION_PATH_BASE.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / CELO\_DERIVATION\_PATH\_BASE 6 | 7 | # Variable: CELO\_DERIVATION\_PATH\_BASE 8 | 9 | > `const` **CELO\_DERIVATION\_PATH\_BASE**: `"m/44'/52752'/0'"` = `"m/44'/52752'/0'"` 10 | 11 | Defined in: [packages/sdk/base/src/account.ts:1](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/account.ts#L1) 12 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/variables/BLS_PUBLIC_KEY_SIZE.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / BLS\_PUBLIC\_KEY\_SIZE 6 | 7 | # Variable: BLS\_PUBLIC\_KEY\_SIZE 8 | 9 | > `const` **BLS\_PUBLIC\_KEY\_SIZE**: `96` = `96` 10 | 11 | Defined in: [cryptographic-utils/src/bls.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L10) 12 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-rpc/lib/test-utils/ganache.teardown.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const ganache_teardown_1 = __importDefault(require("@celo/dev-utils/lib/ganache-teardown")); 7 | exports.default = ganache_teardown_1.default; 8 | //# sourceMappingURL=ganache.teardown.js.map -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | **/.next 3 | **/coverage 4 | **/node_modules 5 | **/privacy/* 6 | .git/ 7 | 8 | packages/**/dist 9 | packages/**/lib 10 | packages/**/lib-es 11 | 12 | # Needed because we have packages/celotool/src/lib 13 | !packages/celotool/src/** 14 | 15 | packages/docs/_book 16 | 17 | 18 | # prettier eats Latex underscore escapting and doesn't seem to have an option to disable 19 | packages/docs/celo-codebase/protocol/proof-of-stake/epoch-rewards.md 20 | 21 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/zeroRange.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / zeroRange 6 | 7 | # Function: zeroRange() 8 | 9 | > **zeroRange**(`to`): `number`[] 10 | 11 | Defined in: [packages/sdk/base/src/collections.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/collections.ts#L23) 12 | 13 | ## Parameters 14 | 15 | ### to 16 | 17 | `number` 18 | 19 | ## Returns 20 | 21 | `number`[] 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/type-aliases/NameClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / NameClaim 6 | 7 | # Type Alias: NameClaim 8 | 9 | > **NameClaim** = `t.TypeOf`\<*typeof* `NameClaimType`\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:67](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L67) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/types/variables/SignatureType.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [types](../README.md) / SignatureType 6 | 7 | # Variable: SignatureType 8 | 9 | > `const` **SignatureType**: `StringC` = `t.string` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/types.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/types.ts#L5) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/types/variables/TimestampType.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [types](../README.md) / TimestampType 6 | 7 | # Variable: TimestampType 8 | 9 | > `const` **TimestampType**: `NumberC` = `t.number` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/types.ts:6](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/types.ts#L6) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/hexToBuffer.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / hexToBuffer 6 | 7 | # Variable: hexToBuffer() 8 | 9 | > `const` **hexToBuffer**: (`input`) => `Buffer` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:12 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `Buffer` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/hexToBuffer.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / hexToBuffer 6 | 7 | # Function: hexToBuffer() 8 | 9 | > **hexToBuffer**(`input`): `Buffer` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L28) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `Buffer` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/isNullAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / isNullAddress 6 | 7 | # Function: isNullAddress() 8 | 9 | > **isNullAddress**(`a`): `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L11) 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/isValidUrl.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / isValidUrl 6 | 7 | # Function: isValidUrl() 8 | 9 | > **isValidUrl**(`url`): `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/io.ts:6](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/io.ts#L6) 12 | 13 | **`Internal`** 14 | 15 | ## Parameters 16 | 17 | ### url 18 | 19 | `string` 20 | 21 | ## Returns 22 | 23 | `boolean` 24 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/trimLeading0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / trimLeading0x 6 | 7 | # Function: trimLeading0x() 8 | 9 | > **trimLeading0x**(`input`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L16) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/type-aliases/DomainClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / DomainClaim 6 | 7 | # Type Alias: DomainClaim 8 | 9 | > **DomainClaim** = `t.TypeOf`\<*typeof* `DomainClaimType`\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:65](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L65) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/type-aliases/RpcUrlClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / RpcUrlClaim 6 | 7 | # Type Alias: RpcUrlClaim 8 | 9 | > **RpcUrlClaim** = `t.TypeOf`\<*typeof* `RpcUrlClaimType`\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L66) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/types/functions/now.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [types](../README.md) / now 6 | 7 | # Function: now() 8 | 9 | > **now**(): `number` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/types.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/types.ts#L9) 12 | 13 | **`Internal`** 14 | 15 | ## Returns 16 | 17 | `number` 18 | -------------------------------------------------------------------------------- /docs/sdk/transactions-uri/functions/parseUri.md: -------------------------------------------------------------------------------- 1 | [**@celo/transactions-uri v5.0.15**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/transactions-uri](../README.md) / parseUri 6 | 7 | # Function: parseUri() 8 | 9 | > **parseUri**(`uri`): `CeloTx` 10 | 11 | Defined in: [tx-uri.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L26) 12 | 13 | ## Parameters 14 | 15 | ### uri 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `CeloTx` 22 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/trimLeading0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / trimLeading0x 6 | 7 | # Variable: trimLeading0x() 8 | 9 | > `const` **trimLeading0x**: (`input`) => `string` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:8 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-ledger/variables/CELO_BASE_DERIVATION_PATH.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-ledger v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-ledger](../README.md) / CELO\_BASE\_DERIVATION\_PATH 6 | 7 | # Variable: CELO\_BASE\_DERIVATION\_PATH 8 | 9 | > `const` **CELO\_BASE\_DERIVATION\_PATH**: `string` 10 | 11 | Defined in: [wallet-ledger/src/ledger-wallet.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L16) 12 | -------------------------------------------------------------------------------- /packages/typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "allowSyntheticDefaultImports": false, 5 | "baseUrl": ".", 6 | "importHelpers": true, 7 | "lib": ["es7", "esnext"], 8 | "moduleResolution": "node16", 9 | "noImplicitAny": true, 10 | "noUnusedLocals": true, 11 | "strictNullChecks": true, 12 | "skipLibCheck": true, 13 | "target": "es6", 14 | "strict": true 15 | }, 16 | "exclude": ["node_modules"] 17 | } 18 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/normalizeAccents.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / normalizeAccents 6 | 7 | # Function: normalizeAccents() 8 | 9 | > **normalizeAccents**(`str`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/string.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/string.ts#L10) 12 | 13 | ## Parameters 14 | 15 | ### str 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/normalizeAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / normalizeAddress 6 | 7 | # Function: normalizeAddress() 8 | 9 | > **normalizeAddress**(`a`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L9) 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/type-aliases/StorageClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / StorageClaim 6 | 7 | # Type Alias: StorageClaim 8 | 9 | > **StorageClaim** = `t.TypeOf`\<*typeof* `StorageClaimType`\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:68](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L68) 12 | -------------------------------------------------------------------------------- /packages/sdk/base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './account' 2 | export * from './address' 3 | export * from './async' 4 | export * from './collections' 5 | export * from './currencies' 6 | export * from './future' 7 | export * from './inputValidation' 8 | export * from './io' 9 | export * from './logger' 10 | export * from './parsing' 11 | export * from './phoneNumbers' 12 | export * from './result' 13 | export * from './signatureUtils' 14 | export * from './string' 15 | export * from './task' 16 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/bufferToHex.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / bufferToHex 6 | 7 | # Function: bufferToHex() 8 | 9 | > **bufferToHex**(`buf`): `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L30) 12 | 13 | ## Parameters 14 | 15 | ### buf 16 | 17 | `Buffer` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/connect/type-aliases/CeloTransactionParams.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / CeloTransactionParams 6 | 7 | # Type Alias: CeloTransactionParams 8 | 9 | > **CeloTransactionParams** = `Omit`\<[`CeloTx`](CeloTx.md), `"data"`\> 10 | 11 | Defined in: [packages/sdk/connect/src/utils/celo-transaction-object.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L5) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/account/README.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../README.md) / account 6 | 7 | # account 8 | 9 | ## Type Aliases 10 | 11 | - [AccountClaim](type-aliases/AccountClaim.md) 12 | 13 | ## Variables 14 | 15 | - [AccountClaimType](variables/AccountClaimType.md) 16 | - [AccountClaimTypeH](variables/AccountClaimTypeH.md) 17 | 18 | ## Functions 19 | 20 | - [createAccountClaim](functions/createAccountClaim.md) 21 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/bufferToHex.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / bufferToHex 6 | 7 | # Variable: bufferToHex() 8 | 9 | > `const` **bufferToHex**: (`buf`) => `` `0x${string}` `` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:13 12 | 13 | ## Parameters 14 | 15 | ### buf 16 | 17 | `Buffer` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /packages/actions/src/rpc-methods.ts: -------------------------------------------------------------------------------- 1 | import type { Address, Hex } from 'viem' 2 | import { CeloClient } from './client.js' 3 | 4 | export async function getGasPriceOnCelo(client: CeloClient, feeCurrency?: Address) { 5 | const gasPrice = await client.request<{ 6 | Parameters: [Address] | [] 7 | Method: 'eth_gasPrice' 8 | ReturnType: Hex 9 | }>({ 10 | method: 'eth_gasPrice', 11 | params: feeCurrency ? [feeCurrency] : [], 12 | }) 13 | 14 | return BigInt(gasPrice) 15 | } 16 | -------------------------------------------------------------------------------- /packages/docs/viem-account-ledger/variables/DEFAULT_DERIVATION_PATH.md: -------------------------------------------------------------------------------- 1 | [**@celo/viem-account-ledger v1.2.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/viem-account-ledger](../globals.md) / DEFAULT\_DERIVATION\_PATH 6 | 7 | # Variable: DEFAULT\_DERIVATION\_PATH 8 | 9 | > `const` **DEFAULT\_DERIVATION\_PATH**: `string` 10 | 11 | Defined in: [packages/viem-account-ledger/src/constants.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/viem-account-ledger/src/constants.ts#L5) 12 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-base/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-base", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-hsm", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /scripts/hooks/prereleasecheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BRANCH="$(git rev-parse --abbrev-ref HEAD)" 4 | 5 | # Ensure that its not possible to commit to a prerelease branch without a pre.json file 6 | if [[ $BRANCH == prerelease* ]]; then 7 | echo "checking for pre.json" 8 | PRE_FILE=.changeset/pre.json 9 | if test -f "$PRE_FILE"; then 10 | echo "$PRE_FILE exists." 11 | else 12 | echo "$PRE_FILE does not exist. Run yarn beta-enter to create it." 13 | exit 1 14 | fi 15 | fi -------------------------------------------------------------------------------- /docs/sdk/base/functions/getAddressChunks.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / getAddressChunks 6 | 7 | # Function: getAddressChunks() 8 | 9 | > **getAddressChunks**(`input`): `string`[] 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L23) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string`[] 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/type-aliases/AttestationRequest.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / AttestationRequest 6 | 7 | # Type Alias: AttestationRequest 8 | 9 | > **AttestationRequest** = `t.TypeOf`\<*typeof* [`AttestationRequestType`](../variables/AttestationRequestType.md)\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:41](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L41) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/getAddressChunks.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / getAddressChunks 6 | 7 | # Variable: getAddressChunks() 8 | 9 | > `const` **getAddressChunks**: (`input`) => `string`[] 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:10 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string`[] 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/toArrayBuffer.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / toArrayBuffer 6 | 7 | # Function: toArrayBuffer() 8 | 9 | > **toArrayBuffer**(`b`): `ArrayBuffer` 10 | 11 | Defined in: [ber-utils.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L5) 12 | 13 | ## Parameters 14 | 15 | ### b 16 | 17 | `Buffer` 18 | 19 | ## Returns 20 | 21 | `ArrayBuffer` 22 | -------------------------------------------------------------------------------- /packages/sdk/base/src/package.test.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs' 2 | 3 | const packageJson = JSON.parse(readFileSync('./package.json', 'utf-8')) 4 | 5 | describe('Base package', () => { 6 | // @celo/base is built on the premise of having absolutely no dependencies, no exceptions made 7 | it('Should have an explicitly defined empty dependencies property', () => { 8 | expect(packageJson).toBeInstanceOf(Object) 9 | expect(packageJson).not.toHaveProperty('dependencies') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/wrappers/Freezer.ts: -------------------------------------------------------------------------------- 1 | import { Freezer } from '@celo/abis/web3/Freezer' 2 | import { BaseWrapper, proxyCall, proxySend } from './BaseWrapper' 3 | 4 | export class FreezerWrapper extends BaseWrapper { 5 | freeze = proxySend(this.connection, this.contract.methods.freeze) 6 | unfreeze = proxySend(this.connection, this.contract.methods.unfreeze) 7 | isFrozen = proxyCall(this.contract.methods.isFrozen) 8 | } 9 | 10 | export type FreezerWrapperType = FreezerWrapper 11 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-ledger/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-ledger", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-local/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-local", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-remote/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-remote", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | _Tell us why these changes are being made_ 4 | 5 | #### Other changes 6 | 7 | _Describe any minor or "drive-by" changes here. If none delete this section_ 8 | 9 | ### Tested 10 | 11 | _An explanation of how the changes were tested or an explanation as to why they don't need to be._ 12 | 13 | 14 | ### How to QA 15 | 16 | _List of steps required to QA the change if applicable_ 17 | 18 | ### Related issues 19 | 20 | - Fixes #[issue number here] 21 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/eqAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / eqAddress 6 | 7 | # Function: eqAddress() 8 | 9 | > **eqAddress**(`a`, `b`): `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:7](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L7) 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | `string` 18 | 19 | ### b 20 | 21 | `string` 22 | 23 | ## Returns 24 | 25 | `boolean` 26 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/isE164Number.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / isE164Number 6 | 7 | # Function: isE164Number() 8 | 9 | > **isE164Number**(`phoneNumber`): `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/phoneNumbers.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/phoneNumbers.ts#L11) 12 | 13 | ## Parameters 14 | 15 | ### phoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/stringToBoolean.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / stringToBoolean 6 | 7 | # Function: stringToBoolean() 8 | 9 | > **stringToBoolean**(`inputString`): `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/parsing.ts:1](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/parsing.ts#L1) 12 | 13 | ## Parameters 14 | 15 | ### inputString 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/connect/variables/PROXY_ADMIN_ADDRESS.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / PROXY\_ADMIN\_ADDRESS 6 | 7 | # Variable: PROXY\_ADMIN\_ADDRESS 8 | 9 | > `const` **PROXY\_ADMIN\_ADDRESS**: `"0x4200000000000000000000000000000000000018"` = `'0x4200000000000000000000000000000000000018'` 10 | 11 | Defined in: [packages/sdk/connect/src/index.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/index.ts#L11) 12 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/type-aliases/AttestationResponse.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / AttestationResponse 6 | 7 | # Type Alias: AttestationResponse 8 | 9 | > **AttestationResponse** = `t.TypeOf`\<*typeof* [`AttestationResponseType`](../variables/AttestationResponseType.md)\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:87](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L87) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/ensureLeading0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / ensureLeading0x 6 | 7 | # Variable: ensureLeading0x() 8 | 9 | > `const` **ensureLeading0x**: (`input`) => `StrongAddress` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:9 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `StrongAddress` 22 | -------------------------------------------------------------------------------- /packages/docs/viem-account-ledger/variables/CELO_BASE_DERIVATION_PATH.md: -------------------------------------------------------------------------------- 1 | [**@celo/viem-account-ledger v1.2.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/viem-account-ledger](../globals.md) / CELO\_BASE\_DERIVATION\_PATH 6 | 7 | # Variable: CELO\_BASE\_DERIVATION\_PATH 8 | 9 | > `const` **CELO\_BASE\_DERIVATION\_PATH**: `string` 10 | 11 | Defined in: [packages/viem-account-ledger/src/constants.ts:4](https://github.com/celo-org/developer-tooling/blob/master/packages/viem-account-ledger/src/constants.ts#L4) 12 | -------------------------------------------------------------------------------- /packages/sdk/cryptographic-utils/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../docs/sdk/cryptographic-utils", 7 | "gitRevision": "master", 8 | "readme": "README.md", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-aws/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-hsm-aws", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-azure/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-hsm-azure", 7 | "gitRevision": "master", 8 | "readme": "none", 9 | "entryPoints": ["./src"], 10 | "githubPages": false, 11 | "excludeReferences": true, 12 | "includeVersion": true, 13 | "plugin": ["typedoc-plugin-markdown"], 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /packages/sdk/wallets/wallet-hsm-gcp/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/*+(index|.test).ts"], 3 | "excludePrivate": true, 4 | "excludeProtected": true, 5 | "hideGenerator": true, 6 | "out": "../../../../docs/sdk/wallet-hsm-gcp", 7 | "gitRevision": "master", 8 | "entryPoints": ["./src"], 9 | "githubPages": false, 10 | "excludeReferences": true, 11 | "includeVersion": true, 12 | "plugin": ["typedoc-plugin-markdown"], 13 | "readme": "none", 14 | "entryPointStrategy": "resolve" 15 | } 16 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "celo-org/developer-tooling" }], 4 | "commit": true, 5 | "fixed": [["@celo/wallet-*"]], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "master", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [], 11 | "snapshot": { 12 | "useCalculatedVersion": true, 13 | "prereleaseTemplate": "{tag}-{commit}" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/sleep.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / sleep 6 | 7 | # Function: sleep() 8 | 9 | > **sleep**(`ms`): `Promise`\<`void`\> 10 | 11 | Defined in: [packages/sdk/base/src/async.ts:6](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/async.ts#L6) 12 | 13 | Sleep for a number of milliseconds 14 | 15 | ## Parameters 16 | 17 | ### ms 18 | 19 | `number` 20 | 21 | ## Returns 22 | 23 | `Promise`\<`void`\> 24 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/validateInteger.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / validateInteger 6 | 7 | # Function: validateInteger() 8 | 9 | > **validateInteger**(`input`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/inputValidation.ts:15](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/inputValidation.ts#L15) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/SET_AND_INITIALIZE_IMPLEMENTATION_ABI.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / SET\_AND\_INITIALIZE\_IMPLEMENTATION\_ABI 6 | 7 | # Variable: SET\_AND\_INITIALIZE\_IMPLEMENTATION\_ABI 8 | 9 | > `const` **SET\_AND\_INITIALIZE\_IMPLEMENTATION\_ABI**: `ABIDefinition` 10 | 11 | Defined in: [contractkit/src/proxy.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L66) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/isCIP64.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / isCIP64 6 | 7 | # Function: isCIP64() 8 | 9 | > **isCIP64**(`tx`): `boolean` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:313](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L313) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/isCIP66.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / isCIP66 6 | 7 | # Function: isCIP66() 8 | 9 | > **isCIP66**(`tx`): `boolean` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:309](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L309) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/publicKeyFromAsn1.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / publicKeyFromAsn1 6 | 7 | # Function: publicKeyFromAsn1() 8 | 9 | > **publicKeyFromAsn1**(`b`): `BigNumber` 10 | 11 | Defined in: [ber-utils.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L9) 12 | 13 | ## Parameters 14 | 15 | ### b 16 | 17 | `Buffer` 18 | 19 | ## Returns 20 | 21 | `BigNumber` 22 | -------------------------------------------------------------------------------- /packages/viem-account-ledger/vitest.config.ts: -------------------------------------------------------------------------------- 1 | // vitest.config.ts 2 | import { coverageConfigDefaults, defineConfig } from 'vitest/config' 3 | 4 | export default defineConfig({ 5 | test: { 6 | server: { 7 | sourcemap: process.env.CI ? false : true, // Disable sourcemaps in CI for performance 8 | }, 9 | coverage: { 10 | reporter: ['json', 'clover', 'lcov'], 11 | exclude: ['**/data**', '**/tokens**', '**/test-utils**', ...coverageConfigDefaults.exclude], 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/ensureLeading0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / ensureLeading0x 6 | 7 | # Function: ensureLeading0x() 8 | 9 | > **ensureLeading0x**(`input`): `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L18) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/keybase/README.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../README.md) / keybase 6 | 7 | # keybase 8 | 9 | ## Variables 10 | 11 | - [keybaseFilePathToProof](variables/keybaseFilePathToProof.md) 12 | 13 | ## Functions 14 | 15 | - [createKeybaseClaim](functions/createKeybaseClaim.md) 16 | - [proofFileName](functions/proofFileName.md) 17 | - [targetURL](functions/targetURL.md) 18 | - [verifyKeybaseClaim](functions/verifyKeybaseClaim.md) 19 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/keybase/variables/keybaseFilePathToProof.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [keybase](../README.md) / keybaseFilePathToProof 6 | 7 | # Variable: keybaseFilePathToProof 8 | 9 | > `const` **keybaseFilePathToProof**: `".well-known/celo/"` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/keybase.ts:8](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/keybase.ts#L8) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/isHexString.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / isHexString 6 | 7 | # Variable: isHexString() 8 | 9 | > `const` **isHexString**: (`input`) => `` input is `0x${string}` `` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:11 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` input is `0x${string}` `` 22 | -------------------------------------------------------------------------------- /packages/actions/src/contract-name.ts: -------------------------------------------------------------------------------- 1 | // When we need more contracts here we can either list them or fetch all values of an Enum, 2 | // but by abstracting the type we have flexibility and single point of change 3 | 4 | export type ContractName = 5 | | 'Accounts' 6 | | 'EpochManager' 7 | | 'Election' 8 | | 'FeeCurrencyDirectory' 9 | | 'Governance' 10 | | 'GoldToken' 11 | | 'LockedGold' 12 | | 'ScoreManager' 13 | | 'StableToken' 14 | | 'StableTokenEUR' 15 | | 'StableTokenBRL' 16 | | 'Validators' 17 | -------------------------------------------------------------------------------- /packages/actions/src/contracts/erc20.ts: -------------------------------------------------------------------------------- 1 | import { erc20Abi, getContract, type Address, type GetContractReturnType } from 'viem' 2 | import { Clients } from '../client.js' 3 | 4 | export async function getERC20Contract( 5 | clients: T, 6 | address: Address 7 | ): Promise> { 8 | return getContract({ 9 | address, 10 | abi: erc20Abi, 11 | client: clients, 12 | }) 13 | } 14 | export type ERC20 = GetContractReturnType 15 | -------------------------------------------------------------------------------- /packages/sdk/utils/src/parsing.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js' 2 | 3 | // Exports moved to @celo/base, forwarding them 4 | // here for backwards compatibility 5 | export { parseSolidityStringArray, stringToBoolean } from '@celo/base/lib/parsing' 6 | 7 | export const parseInputAmount = (inputString: string, decimalSeparator = '.'): BigNumber => { 8 | if (decimalSeparator !== '.') { 9 | inputString = inputString.replace(decimalSeparator, '.') 10 | } 11 | return new BigNumber(inputString || '0') 12 | } 13 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/appendPath.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / appendPath 6 | 7 | # Function: appendPath() 8 | 9 | > **appendPath**(`baseUrl`, `path`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/string.ts:1](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/string.ts#L1) 12 | 13 | ## Parameters 14 | 15 | ### baseUrl 16 | 17 | `string` 18 | 19 | ### path 20 | 21 | `string` 22 | 23 | ## Returns 24 | 25 | `string` 26 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/isHexString.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / isHexString 6 | 7 | # Function: isHexString() 8 | 9 | > **isHexString**(`input`): `` input is `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L26) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` input is `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/type-aliases/GetAttestationRequest.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / GetAttestationRequest 6 | 7 | # Type Alias: GetAttestationRequest 8 | 9 | > **GetAttestationRequest** = `t.TypeOf`\<*typeof* [`GetAttestationRequestType`](../variables/GetAttestationRequestType.md)\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:53](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L53) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/normalizeAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / normalizeAddress 6 | 7 | # Variable: normalizeAddress() 8 | 9 | > `const` **normalizeAddress**: (`a`) => `string` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:5 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | [`Address`](../type-aliases/Address.md) 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/isEIP1559.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / isEIP1559 6 | 7 | # Function: isEIP1559() 8 | 9 | > **isEIP1559**(`tx`): `boolean` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:305](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L305) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/PROXY_SET_IMPLEMENTATION_SIGNATURE.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / PROXY\_SET\_IMPLEMENTATION\_SIGNATURE 6 | 7 | # Variable: PROXY\_SET\_IMPLEMENTATION\_SIGNATURE 8 | 9 | > `const` **PROXY\_SET\_IMPLEMENTATION\_SIGNATURE**: `string` = `SET_IMPLEMENTATION_ABI.signature` 10 | 11 | Defined in: [contractkit/src/proxy.ts:109](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L109) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/type-aliases/KeybaseClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / KeybaseClaim 6 | 7 | # Type Alias: KeybaseClaim 8 | 9 | > **KeybaseClaim** = `t.TypeOf`\<*typeof* [`KeybaseClaimType`](../variables/KeybaseClaimType.md)\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L13) 12 | -------------------------------------------------------------------------------- /packages/sdk/base/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/base", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /packages/sdk/utils/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/utils", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/type-aliases/CeloToken.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / CeloToken 6 | 7 | # Type Alias: ~~CeloToken~~ 8 | 9 | > **CeloToken** = [`CeloTokenContract`](CeloTokenContract.md) 10 | 11 | Defined in: [contractkit/src/base.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L50) 12 | 13 | Deprecated alias for CeloTokenContract. 14 | 15 | ## Deprecated 16 | 17 | Use CeloTokenContract instead 18 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/type-aliases/RandomNumberGenerator.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / RandomNumberGenerator 6 | 7 | # Type Alias: RandomNumberGenerator() 8 | 9 | > **RandomNumberGenerator** = (`size`, `callback`) => `void` 10 | 11 | Defined in: base/lib/account.d.ts:24 12 | 13 | ## Parameters 14 | 15 | ### size 16 | 17 | `number` 18 | 19 | ### callback 20 | 21 | (`err`, `buf`) => `void` 22 | 23 | ## Returns 24 | 25 | `void` 26 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/variables/DOMAIN_TXT_HEADER.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / DOMAIN\_TXT\_HEADER 6 | 7 | # Variable: DOMAIN\_TXT\_HEADER 8 | 9 | > `const` **DOMAIN\_TXT\_HEADER**: `"celo-site-verification"` = `'celo-site-verification'` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L64) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/handleBigInt.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / handleBigInt 6 | 7 | # Function: handleBigInt() 8 | 9 | > **handleBigInt**(`n`): `bigint` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:880](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L880) 12 | 13 | ## Parameters 14 | 15 | ### n 16 | 17 | `Uint8Array` 18 | 19 | ## Returns 20 | 21 | `bigint` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/handleData.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / handleData 6 | 7 | # Function: handleData() 8 | 9 | > **handleData**(`data`): `string` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:894](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L894) 12 | 13 | ## Parameters 14 | 15 | ### data 16 | 17 | `Uint8Array` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/handleNumber.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / handleNumber 6 | 7 | # Function: handleNumber() 8 | 9 | > **handleNumber**(`n`): `number` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:868](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L868) 12 | 13 | ## Parameters 14 | 15 | ### n 16 | 17 | `Uint8Array` 18 | 19 | ## Returns 20 | 21 | `number` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/isPriceToLow.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / isPriceToLow 6 | 7 | # Function: isPriceToLow() 8 | 9 | > **isPriceToLow**(`tx`): `boolean` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:291](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L291) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-ledger/README.md: -------------------------------------------------------------------------------- 1 | **@celo/wallet-ledger v8.0.2** 2 | 3 | *** 4 | 5 | # @celo/wallet-ledger v8.0.2 6 | 7 | ## Enumerations 8 | 9 | - [AddressValidation](enumerations/AddressValidation.md) 10 | 11 | ## Classes 12 | 13 | - [LedgerSigner](classes/LedgerSigner.md) 14 | - [LedgerWallet](classes/LedgerWallet.md) 15 | 16 | ## Variables 17 | 18 | - [CELO\_BASE\_DERIVATION\_PATH](variables/CELO_BASE_DERIVATION_PATH.md) 19 | 20 | ## Functions 21 | 22 | - [newLedgerWalletWithSetup](functions/newLedgerWalletWithSetup.md) 23 | -------------------------------------------------------------------------------- /packages/actions/src/rpc-methods.test.ts: -------------------------------------------------------------------------------- 1 | import { viem_testWithAnvil } from '@celo/dev-utils/viem/anvil-test' 2 | import { describe, expect, it } from 'vitest' 3 | import { getGasPriceOnCelo } from './rpc-methods.js' 4 | 5 | viem_testWithAnvil('rpc-methods', (client) => { 6 | describe('getGasPriceOnCelo', () => { 7 | it('works', async () => { 8 | const gasPrice = await getGasPriceOnCelo(client) 9 | expect(gasPrice).toBeTypeOf('bigint') 10 | expect(gasPrice).toBeGreaterThan(0n) 11 | }) 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/normalizeAddressWith0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / normalizeAddressWith0x 6 | 7 | # Function: normalizeAddressWith0x() 8 | 9 | > **normalizeAddressWith0x**(`a`): `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L13) 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/account/type-aliases/AccountClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [account](../README.md) / AccountClaim 6 | 7 | # Type Alias: AccountClaim 8 | 9 | > **AccountClaim** = `t.TypeOf`\<*typeof* [`AccountClaimTypeH`](../variables/AccountClaimTypeH.md)\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/account.ts:35](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/account.ts#L35) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/types/variables/SINGULAR_CLAIM_TYPES.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [types](../README.md) / SINGULAR\_CLAIM\_TYPES 6 | 7 | # Variable: SINGULAR\_CLAIM\_TYPES 8 | 9 | > `const` **SINGULAR\_CLAIM\_TYPES**: [`ClaimTypes`](../enumerations/ClaimTypes.md)[] 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/types.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/types.ts#L27) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/bufferToBigNumber.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / bufferToBigNumber 6 | 7 | # Function: bufferToBigNumber() 8 | 9 | > **bufferToBigNumber**(`input`): `BigNumber` 10 | 11 | Defined in: [signature-utils.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L28) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `Buffer` 18 | 19 | ## Returns 20 | 21 | `BigNumber` 22 | -------------------------------------------------------------------------------- /packages/sdk/explorer/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/explorer", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /packages/sdk/governance/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/governance", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /packages/sdk/keystores/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/keystores", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/type-aliases/CeloTokenContract.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / CeloTokenContract 6 | 7 | # Type Alias: CeloTokenContract 8 | 9 | > **CeloTokenContract** = `StableTokenContract` \| [`CeloToken`](../enumerations/CeloContract.md#celotoken) \| [`GoldToken`](../enumerations/CeloContract.md#goldtoken) 10 | 11 | Defined in: [contractkit/src/base.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L42) 12 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/rlpEncodedTx.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / rlpEncodedTx 6 | 7 | # Function: rlpEncodedTx() 8 | 9 | > **rlpEncodedTx**(`tx`): `RLPEncodedTx` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:134](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L134) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ## Returns 20 | 21 | `RLPEncodedTx` 22 | -------------------------------------------------------------------------------- /packages/sdk/connect/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/connect", 8 | "gitRevision": "master", 9 | "readme": "./README.md", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/types/variables/VERIFIABLE_CLAIM_TYPES.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [types](../README.md) / VERIFIABLE\_CLAIM\_TYPES 6 | 7 | # Variable: VERIFIABLE\_CLAIM\_TYPES 8 | 9 | > `const` **VERIFIABLE\_CLAIM\_TYPES**: [`ClaimTypes`](../enumerations/ClaimTypes.md)[] 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/types.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/types.ts#L26) 12 | -------------------------------------------------------------------------------- /dt-renovate-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["local>celo-org/.github:renovate-config"], 4 | "prCreation": "not-pending", 5 | "prConcurrentLimit": 2, 6 | "minimumReleaseAge": "5 days", 7 | "rangeStrategy": "bump", 8 | "major": { "minimumReleaseAge": "14 days" }, 9 | "packageRules": [ 10 | { 11 | "matchManagers": ["github-actions"], 12 | "automerge": true, 13 | "autoApprove": true, 14 | "prCreation": "status-success" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/sdk/base/src/parsing.test.ts: -------------------------------------------------------------------------------- 1 | import { stringToBoolean } from './parsing' 2 | 3 | test('stringToBoolean()', () => { 4 | expect(stringToBoolean('true')).toBe(true) 5 | expect(stringToBoolean(' true ')).toBe(true) 6 | expect(stringToBoolean('false')).toBe(false) 7 | expect(stringToBoolean(' false ')).toBe(false) 8 | 9 | expect(stringToBoolean('FaLse')).toBe(false) 10 | expect(stringToBoolean('TruE')).toBe(true) 11 | 12 | expect(() => stringToBoolean('fals')).toThrow("Unable to parse 'fals' as boolean") 13 | }) 14 | -------------------------------------------------------------------------------- /packages/sdk/phone-utils/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/phone-utils", 8 | "gitRevision": "master", 9 | "readme": "README.md", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /packages/sdk/transactions-uri/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*+(index|.test).ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/transactions-uri", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve" 16 | } 17 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/intersection.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / intersection 6 | 7 | # Function: intersection() 8 | 9 | > **intersection**\<`T`\>(`arrays`): `T`[] 10 | 11 | Defined in: [packages/sdk/base/src/collections.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/collections.ts#L32) 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` 18 | 19 | ## Parameters 20 | 21 | ### arrays 22 | 23 | `T`[][] 24 | 25 | ## Returns 26 | 27 | `T`[] 28 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/enumerations/MnemonicStrength.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / MnemonicStrength 6 | 7 | # Enumeration: MnemonicStrength 8 | 9 | Defined in: base/lib/account.d.ts:9 10 | 11 | ## Enumeration Members 12 | 13 | ### s128\_12words 14 | 15 | > **s128\_12words**: `128` 16 | 17 | Defined in: base/lib/account.d.ts:10 18 | 19 | *** 20 | 21 | ### s256\_24words 22 | 23 | > **s256\_24words**: `256` 24 | 25 | Defined in: base/lib/account.d.ts:11 26 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/handleStringNumber.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / handleStringNumber 6 | 7 | # Function: handleStringNumber() 8 | 9 | > **handleStringNumber**(`n`): `string` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:874](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L874) 12 | 13 | ## Parameters 14 | 15 | ### n 16 | 17 | `Uint8Array` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../typescript/tsconfig.library.json", 3 | "compilerOptions": { 4 | "resolveJsonModule": true, 5 | "moduleResolution": "nodenext", 6 | "declarationMap": true, 7 | "module": "Node16", 8 | "rootDir": "src", 9 | "outDir": "lib", 10 | "esModuleInterop": true, 11 | "target": "es2020" 12 | }, 13 | "include": ["src/**/*", "src/commands/dkg/DKG.json", "../dev-utils/dist/cjs/matchers.d.ts"], 14 | "exclude": ["src/**.test.ts"], 15 | "ts-node": { 16 | "esm": true 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/sdk/base/enumerations/Token.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Token 6 | 7 | # Enumeration: Token 8 | 9 | Defined in: [packages/sdk/base/src/currencies.ts:7](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L7) 10 | 11 | ## Enumeration Members 12 | 13 | ### CELO 14 | 15 | > **CELO**: `"CELO"` 16 | 17 | Defined in: [packages/sdk/base/src/currencies.ts:8](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/currencies.ts#L8) 18 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/findAddressIndex.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / findAddressIndex 6 | 7 | # Function: findAddressIndex() 8 | 9 | > **findAddressIndex**(`address`, `addresses`): `number` 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L34) 12 | 13 | ## Parameters 14 | 15 | ### address 16 | 17 | `string` 18 | 19 | ### addresses 20 | 21 | `string`[] 22 | 23 | ## Returns 24 | 25 | `number` 26 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/serializeSignature.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / serializeSignature 6 | 7 | # Function: serializeSignature() 8 | 9 | > **serializeSignature**(`signature`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/signatureUtils.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/signatureUtils.ts#L26) 12 | 13 | ## Parameters 14 | 15 | ### signature 16 | 17 | [`Signature`](../interfaces/Signature.md) 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/REGISTRY_CONTRACT_ADDRESS.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / REGISTRY\_CONTRACT\_ADDRESS 6 | 7 | # Variable: REGISTRY\_CONTRACT\_ADDRESS 8 | 9 | > `const` **REGISTRY\_CONTRACT\_ADDRESS**: `"0x000000000000000000000000000000000000ce10"` = `'0x000000000000000000000000000000000000ce10'` 10 | 11 | Defined in: [contractkit/src/address-registry.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/address-registry.ts#L10) 12 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/metadata/type-aliases/IdentityMetadata.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [metadata](../README.md) / IdentityMetadata 6 | 7 | # Type Alias: IdentityMetadata 8 | 9 | > **IdentityMetadata** = `t.TypeOf`\<*typeof* [`IdentityMetadataType`](../variables/IdentityMetadataType.md)\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/metadata.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/metadata.ts#L32) 12 | -------------------------------------------------------------------------------- /packages/typescript/tsconfig.library.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "lib": ["es2015", "es2016"], 5 | "target": "es6", 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "composite": true, 9 | "allowSyntheticDefaultImports": true, 10 | "esModuleInterop": true, 11 | "strict": true, 12 | "declaration": true, 13 | "sourceMap": true, 14 | "skipLibCheck": true, 15 | "noImplicitAny": true, 16 | "noUnusedLocals": true, 17 | "noUnusedParameters": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/functions/getBlsPublicKey.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / getBlsPublicKey 6 | 7 | # Function: getBlsPublicKey() 8 | 9 | > **getBlsPublicKey**(`privateKeyHex`): `string` 10 | 11 | Defined in: [cryptographic-utils/src/bls.ts:45](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L45) 12 | 13 | ## Parameters 14 | 15 | ### privateKeyHex 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/isE164NumberStrict.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / isE164NumberStrict 6 | 7 | # Function: isE164NumberStrict() 8 | 9 | > **isE164NumberStrict**(`phoneNumber`): `boolean` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/phoneNumbers.ts:84](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/phoneNumbers.ts#L84) 12 | 13 | ## Parameters 14 | 15 | ### phoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/type-aliases/AttestationServiceTestRequest.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / AttestationServiceTestRequest 6 | 7 | # Type Alias: AttestationServiceTestRequest 8 | 9 | > **AttestationServiceTestRequest** = `t.TypeOf`\<*typeof* [`AttestationServiceTestRequestType`](../variables/AttestationServiceTestRequestType.md)\> 10 | 11 | Defined in: [packages/sdk/phone-utils/src/io.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/io.ts#L23) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/eqAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / eqAddress 6 | 7 | # Variable: eqAddress() 8 | 9 | > `const` **eqAddress**: (`a`, `b`) => `boolean` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:4 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | [`Address`](../type-aliases/Address.md) 18 | 19 | ### b 20 | 21 | [`Address`](../type-aliases/Address.md) 22 | 23 | ## Returns 24 | 25 | `boolean` 26 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/normalizeAddressWith0x.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / normalizeAddressWith0x 6 | 7 | # Variable: normalizeAddressWith0x() 8 | 9 | > `const` **normalizeAddressWith0x**: (`a`) => `` `0x${string}` `` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:7 12 | 13 | ## Parameters 14 | 15 | ### a 16 | 17 | [`Address`](../type-aliases/Address.md) 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/getAddressFromPublicKey.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / getAddressFromPublicKey 6 | 7 | # Function: getAddressFromPublicKey() 8 | 9 | > **getAddressFromPublicKey**(`publicKey`): `string` 10 | 11 | Defined in: [signature-utils.ts:99](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L99) 12 | 13 | ## Parameters 14 | 15 | ### publicKey 16 | 17 | `BigNumber` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /packages/sdk/phone-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './countries' 2 | export { Countries, LocalizedCountry } from './countries' 3 | export * from './getCountryEmoji' 4 | export * from './inputValidation' 5 | export * from './io' 6 | export { 7 | getCountryCode, 8 | getDisplayNumberInternational, 9 | getDisplayPhoneNumber, 10 | getE164DisplayNumber, 11 | getE164Number, 12 | getExampleNumber, 13 | getRegionCode, 14 | getRegionCodeFromCountryCode, 15 | isE164NumberStrict, 16 | parsePhoneNumber, 17 | PhoneNumberUtils, 18 | } from './phoneNumbers' 19 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/handleHexString.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / handleHexString 6 | 7 | # Function: handleHexString() 8 | 9 | > **handleHexString**(`adr`): `` `0x${string}` `` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:886](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L886) 12 | 13 | ## Parameters 14 | 15 | ### adr 16 | 17 | `Uint8Array` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/mapAddressListOnto.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / mapAddressListOnto 6 | 7 | # Function: mapAddressListOnto() 8 | 9 | > **mapAddressListOnto**(`oldAddress`, `newAddress`): `any`[] 10 | 11 | Defined in: [packages/sdk/base/src/address.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/address.ts#L38) 12 | 13 | ## Parameters 14 | 15 | ### oldAddress 16 | 17 | `string`[] 18 | 19 | ### newAddress 20 | 21 | `string`[] 22 | 23 | ## Returns 24 | 25 | `any`[] 26 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/getE164DisplayNumber.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / getE164DisplayNumber 6 | 7 | # Function: getE164DisplayNumber() 8 | 9 | > **getE164DisplayNumber**(`e164PhoneNumber`): `string` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/phoneNumbers.ts:69](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/phoneNumbers.ts#L69) 12 | 13 | ## Parameters 14 | 15 | ### e164PhoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/conditionWatcher.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / conditionWatcher 6 | 7 | # Function: conditionWatcher() 8 | 9 | > **conditionWatcher**(`opts`): [`RunningTask`](../interfaces/RunningTask.md) 10 | 11 | Defined in: [packages/sdk/base/src/task.ts:93](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/task.ts#L93) 12 | 13 | ## Parameters 14 | 15 | ### opts 16 | 17 | `RepeatTaskOptions` & `object` 18 | 19 | ## Returns 20 | 21 | [`RunningTask`](../interfaces/RunningTask.md) 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/keybase/functions/proofFileName.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [keybase](../README.md) / proofFileName 6 | 7 | # Function: proofFileName() 8 | 9 | > **proofFileName**(`address`): `string` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/keybase.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/keybase.ts#L9) 12 | 13 | ## Parameters 14 | 15 | ### address 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/recoverTransaction.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / recoverTransaction 6 | 7 | # Function: recoverTransaction() 8 | 9 | > **recoverTransaction**(`rawTx`): \[`CeloTx`, `string`\] 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:460](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L460) 12 | 13 | ## Parameters 14 | 15 | ### rawTx 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | \[`CeloTx`, `string`\] 22 | -------------------------------------------------------------------------------- /packages/sdk/contractkit/src/utils/getParsedSignatureOfAddress.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from '@celo/connect' 2 | import { parseSignature } from '@celo/utils/lib/signatureUtils' 3 | import Web3 from 'web3' 4 | 5 | export const getParsedSignatureOfAddress = async ( 6 | sha3: Web3['utils']['soliditySha3'], 7 | sign: Connection['sign'], 8 | address: string, 9 | signer: string 10 | ) => { 11 | const addressHash = sha3({ type: 'address', value: address })! 12 | const signature = await sign(addressHash, signer) 13 | return parseSignature(addressHash, signature, signer) 14 | } 15 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/validateDecimal.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / validateDecimal 6 | 7 | # Function: validateDecimal() 8 | 9 | > **validateDecimal**(`input`, `decimalSeparator`): `string` 10 | 11 | Defined in: [packages/sdk/base/src/inputValidation.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/inputValidation.ts#L19) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ### decimalSeparator 20 | 21 | `string` = `'.'` 22 | 23 | ## Returns 24 | 25 | `string` 26 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/Comparator.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Comparator 6 | 7 | # Type Alias: Comparator()\ 8 | 9 | > **Comparator**\<`T`\> = (`a`, `b`) => `boolean` 10 | 11 | Defined in: [packages/sdk/base/src/collections.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/collections.ts#L50) 12 | 13 | ## Type Parameters 14 | 15 | ### T 16 | 17 | `T` 18 | 19 | ## Parameters 20 | 21 | ### a 22 | 23 | `T` 24 | 25 | ### b 26 | 27 | `T` 28 | 29 | ## Returns 30 | 31 | `boolean` 32 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/functions/getAllLanguages.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / getAllLanguages 6 | 7 | # Function: getAllLanguages() 8 | 9 | > **getAllLanguages**(): [`MnemonicLanguages`](../enumerations/MnemonicLanguages.md)[] 10 | 11 | Defined in: [cryptographic-utils/src/account.ts:175](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L175) 12 | 13 | ## Returns 14 | 15 | [`MnemonicLanguages`](../enumerations/MnemonicLanguages.md)[] 16 | -------------------------------------------------------------------------------- /docs/sdk/explorer/functions/newLogExplorer.md: -------------------------------------------------------------------------------- 1 | [**@celo/explorer v5.0.18**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/explorer](../README.md) / newLogExplorer 6 | 7 | # Function: newLogExplorer() 8 | 9 | > **newLogExplorer**(`kit`): `Promise`\<[`LogExplorer`](../classes/LogExplorer.md)\> 10 | 11 | Defined in: [log-explorer.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/explorer/src/log-explorer.ts#L10) 12 | 13 | ## Parameters 14 | 15 | ### kit 16 | 17 | `ContractKit` 18 | 19 | ## Returns 20 | 21 | `Promise`\<[`LogExplorer`](../classes/LogExplorer.md)\> 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/validateInput.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / validateInput 6 | 7 | # Function: validateInput() 8 | 9 | > **validateInput**(`input`, `props`): `string` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/inputValidation.ts:20](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/inputValidation.ts#L20) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ### props 20 | 21 | `BaseProps` 22 | 23 | ## Returns 24 | 25 | `string` 26 | -------------------------------------------------------------------------------- /docs/sdk/transactions-uri/functions/QrFromUri.md: -------------------------------------------------------------------------------- 1 | [**@celo/transactions-uri v5.0.15**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/transactions-uri](../README.md) / QrFromUri 6 | 7 | # Function: QrFromUri() 8 | 9 | > **QrFromUri**(`uri`, `type`): `Promise`\<`string`\> 10 | 11 | Defined in: [tx-uri.ts:114](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L114) 12 | 13 | ## Parameters 14 | 15 | ### uri 16 | 17 | `string` 18 | 19 | ### type 20 | 21 | `"svg"` | `"terminal"` | `"utf8"` 22 | 23 | ## Returns 24 | 25 | `Promise`\<`string`\> 26 | -------------------------------------------------------------------------------- /packages/actions/vitest.config.ts: -------------------------------------------------------------------------------- 1 | // vitest.config.ts 2 | import { coverageConfigDefaults, defineConfig } from 'vitest/config' 3 | 4 | export default defineConfig({ 5 | test: { 6 | server: { 7 | sourcemap: false, 8 | }, 9 | // enable access to vitest globally for `@celo/dev-utils` to be able 10 | // to hook into it, useful for testWithAnvil. 11 | globals: true, 12 | coverage: { 13 | reporter: ['json', 'clover', 'lcov'], 14 | exclude: ['**/data**', '**/tokens**', '**/test-utils**', ...coverageConfigDefaults.exclude], 15 | }, 16 | }, 17 | }) 18 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/RandomNumberGenerator.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / RandomNumberGenerator 6 | 7 | # Type Alias: RandomNumberGenerator() 8 | 9 | > **RandomNumberGenerator** = (`size`, `callback`) => `void` 10 | 11 | Defined in: [packages/sdk/base/src/account.ts:29](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/account.ts#L29) 12 | 13 | ## Parameters 14 | 15 | ### size 16 | 17 | `number` 18 | 19 | ### callback 20 | 21 | (`err`, `buf`) => `void` 22 | 23 | ## Returns 24 | 25 | `void` 26 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/functions/setImplementationOnProxy.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / setImplementationOnProxy 6 | 7 | # Function: setImplementationOnProxy() 8 | 9 | > **setImplementationOnProxy**(`address`, `web3`): `any` 10 | 11 | Defined in: [contractkit/src/proxy.ts:159](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L159) 12 | 13 | ## Parameters 14 | 15 | ### address 16 | 17 | `string` 18 | 19 | ### web3 20 | 21 | `Web3` 22 | 23 | ## Returns 24 | 25 | `any` 26 | -------------------------------------------------------------------------------- /docs/sdk/cryptographic-utils/functions/getBlsPoP.md: -------------------------------------------------------------------------------- 1 | [**@celo/cryptographic-utils v6.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/cryptographic-utils](../globals.md) / getBlsPoP 6 | 7 | # Function: getBlsPoP() 8 | 9 | > **getBlsPoP**(`address`, `privateKeyHex`): `string` 10 | 11 | Defined in: [cryptographic-utils/src/bls.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L50) 12 | 13 | ## Parameters 14 | 15 | ### address 16 | 17 | `string` 18 | 19 | ### privateKeyHex 20 | 21 | `string` 22 | 23 | ## Returns 24 | 25 | `string` 26 | -------------------------------------------------------------------------------- /docs/sdk/governance/functions/hotfixToHash.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / hotfixToHash 6 | 7 | # Function: hotfixToHash() 8 | 9 | > **hotfixToHash**(`kit`, `proposal`, `salt`): `Buffer` 10 | 11 | Defined in: [proposals.ts:36](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L36) 12 | 13 | ## Parameters 14 | 15 | ### kit 16 | 17 | `ContractKit` 18 | 19 | ### proposal 20 | 21 | `Proposal` 22 | 23 | ### salt 24 | 25 | `Buffer` 26 | 27 | ## Returns 28 | 29 | `Buffer` 30 | -------------------------------------------------------------------------------- /docs/sdk/governance/functions/isProxySetFunction.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / isProxySetFunction 6 | 7 | # Function: isProxySetFunction() 8 | 9 | > **isProxySetFunction**(`tx`): `boolean` 10 | 11 | Defined in: [proposals.ts:105](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L105) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `Pick`\<[`ProposalTransactionJSON`](../interfaces/ProposalTransactionJSON.md), `"function"`\> 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/functions/hashOfClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / hashOfClaim 6 | 7 | # Function: hashOfClaim() 8 | 9 | > **hashOfClaim**(`claim`): `string` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:104](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L104) 12 | 13 | ## Parameters 14 | 15 | ### claim 16 | 17 | [`Claim`](../type-aliases/Claim.md) 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/getHashFromEncoded.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / getHashFromEncoded 6 | 7 | # Function: getHashFromEncoded() 8 | 9 | > **getHashFromEncoded**(`rlpEncode`): `` `0x${string}` `` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:68](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L68) 12 | 13 | ## Parameters 14 | 15 | ### rlpEncode 16 | 17 | `` `0x${string}` `` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/bigNumberToBuffer.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / bigNumberToBuffer 6 | 7 | # Function: bigNumberToBuffer() 8 | 9 | > **bigNumberToBuffer**(`input`, `lengthInBytes`): `Buffer` 10 | 11 | Defined in: [signature-utils.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L32) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `BigNumber` 18 | 19 | ### lengthInBytes 20 | 21 | `number` 22 | 23 | ## Returns 24 | 25 | `Buffer` 26 | -------------------------------------------------------------------------------- /packages/actions/src/contracts/multisig.ts: -------------------------------------------------------------------------------- 1 | import { multiSigABI } from '@celo/abis' 2 | import { Address, getContract, GetContractReturnType } from 'viem' 3 | import { Clients } from '../client.js' 4 | 5 | export async function getMultiSigContract( 6 | clients: T, 7 | address: Address 8 | ): Promise> { 9 | return getContract({ 10 | address, 11 | abi: multiSigABI, 12 | client: clients, 13 | }) 14 | } 15 | export type MultiSigContract = GetContractReturnType< 16 | typeof multiSigABI, 17 | T 18 | > 19 | -------------------------------------------------------------------------------- /packages/cli/generate_docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | export COLUMNS=88 4 | yarn build 5 | rm -rf ../../docs/command-line-interface 6 | yarn oclif readme --multi --dir=../../docs/command-line-interface 7 | sed -i.bak '/^- \[/d' ../../docs/command-line-interface/* 8 | rm -rf ../../docs/command-line-interface/*.bak 9 | 10 | # Fix GitHub links to point to source files instead of generated lib files 11 | find ../../docs/command-line-interface -name "*.md" -exec sed -i.bak 's|/lib/|/src/|g; s|\.js|\.ts|g; s|\[lib/|\[src/|g' {} \; 12 | rm -rf ../../docs/command-line-interface/*.bak 13 | 14 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/notEmpty.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / notEmpty 6 | 7 | # Function: notEmpty() 8 | 9 | > **notEmpty**\<`TValue`\>(`value`): `value is TValue` 10 | 11 | Defined in: [packages/sdk/base/src/collections.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/collections.ts#L28) 12 | 13 | ## Type Parameters 14 | 15 | ### TValue 16 | 17 | `TValue` 18 | 19 | ## Parameters 20 | 21 | ### value 22 | 23 | `undefined` | `null` | `TValue` 24 | 25 | ## Returns 26 | 27 | `value is TValue` 28 | -------------------------------------------------------------------------------- /docs/sdk/explorer/functions/mapFromPairs.md: -------------------------------------------------------------------------------- 1 | [**@celo/explorer v5.0.18**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/explorer](../README.md) / mapFromPairs 6 | 7 | # Function: mapFromPairs() 8 | 9 | > **mapFromPairs**\<`A`, `B`\>(`pairs`): `Map`\<`A`, `B`\> 10 | 11 | Defined in: [base.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/explorer/src/base.ts#L38) 12 | 13 | ## Type Parameters 14 | 15 | ### A 16 | 17 | `A` 18 | 19 | ### B 20 | 21 | `B` 22 | 23 | ## Parameters 24 | 25 | ### pairs 26 | 27 | \[`A`, `B`\][] 28 | 29 | ## Returns 30 | 31 | `Map`\<`A`, `B`\> 32 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/functions/hashOfClaims.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / hashOfClaims 6 | 7 | # Function: hashOfClaims() 8 | 9 | > **hashOfClaims**(`claims`): `string` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:108](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L108) 12 | 13 | ## Parameters 14 | 15 | ### claims 16 | 17 | [`Claim`](../type-aliases/Claim.md)[] 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/getRegionCode.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / getRegionCode 6 | 7 | # Function: getRegionCode() 8 | 9 | > **getRegionCode**(`e164PhoneNumber`): `undefined` \| `null` \| `string` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/phoneNumbers.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/phoneNumbers.ts#L24) 12 | 13 | ## Parameters 14 | 15 | ### e164PhoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `undefined` \| `null` \| `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/functions/isValidPrivateKey.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / isValidPrivateKey 6 | 7 | # Function: isValidPrivateKey() 8 | 9 | > **isValidPrivateKey**(`privateKey`): `boolean` 10 | 11 | Defined in: [packages/sdk/utils/src/address.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/address.ts#L43) 12 | 13 | ## Parameters 14 | 15 | ### privateKey 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/connect/functions/isPresent.md: -------------------------------------------------------------------------------- 1 | [**@celo/connect v7.0.0**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/connect](../globals.md) / isPresent 6 | 7 | # Function: isPresent() 8 | 9 | > **isPresent**(`value`): value is string \| number \| bigint \| BN 10 | 11 | Defined in: [packages/sdk/connect/src/connection.ts:549](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/connection.ts#L549) 12 | 13 | ## Parameters 14 | 15 | ### value 16 | 17 | `undefined` | `string` | `number` | `bigint` | `BN` 18 | 19 | ## Returns 20 | 21 | value is string \| number \| bigint \| BN 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/functions/serializeClaim.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / serializeClaim 6 | 7 | # Function: serializeClaim() 8 | 9 | > **serializeClaim**(`claim`): `string` 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:113](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L113) 12 | 13 | ## Parameters 14 | 15 | ### claim 16 | 17 | [`Claim`](../type-aliases/Claim.md) 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/getCountryCode.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / getCountryCode 6 | 7 | # Function: getCountryCode() 8 | 9 | > **getCountryCode**(`e164PhoneNumber`): `undefined` \| `null` \| `number` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/phoneNumbers.ts:12](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/phoneNumbers.ts#L12) 12 | 13 | ## Parameters 14 | 15 | ### e164PhoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `undefined` \| `null` \| `number` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/determineTXType.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / determineTXType 6 | 7 | # Function: determineTXType() 8 | 9 | > **determineTXType**(`serializedTransaction`): `OldTransactionTypes` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:511](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L511) 12 | 13 | ## Parameters 14 | 15 | ### serializedTransaction 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `OldTransactionTypes` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-hsm/functions/asn1FromPublicKey.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-hsm v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-hsm](../README.md) / asn1FromPublicKey 6 | 7 | # Function: asn1FromPublicKey() 8 | 9 | > **asn1FromPublicKey**(`bn`): `Buffer` 10 | 11 | Defined in: [ber-utils.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L23) 12 | 13 | This is used only for mocking 14 | Creates an asn1 key to emulate KMS response 15 | 16 | ## Parameters 17 | 18 | ### bn 19 | 20 | `BigNumber` 21 | 22 | ## Returns 23 | 24 | `Buffer` 25 | -------------------------------------------------------------------------------- /packages/sdk/metadata-claims/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "exclude": ["**/*.test.ts"], 4 | "excludePrivate": true, 5 | "excludeProtected": true, 6 | "hideGenerator": true, 7 | "out": "../../../docs/sdk/metadata-claims", 8 | "gitRevision": "master", 9 | "readme": "none", 10 | "entryPoints": ["./src/*.ts"], 11 | "githubPages": false, 12 | "excludeReferences": true, 13 | "includeVersion": true, 14 | "plugin": ["typedoc-plugin-markdown"], 15 | "entryPointStrategy": "resolve", 16 | "validation": { 17 | "notExported": false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/enumerations/StableToken.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / StableToken 6 | 7 | # Enumeration: StableToken 8 | 9 | Defined in: base/lib/currencies.d.ts:1 10 | 11 | ## Enumeration Members 12 | 13 | ### BRLm 14 | 15 | > **BRLm**: `"BRLm"` 16 | 17 | Defined in: base/lib/currencies.d.ts:4 18 | 19 | *** 20 | 21 | ### EURm 22 | 23 | > **EURm**: `"EURm"` 24 | 25 | Defined in: base/lib/currencies.d.ts:3 26 | 27 | *** 28 | 29 | ### USDm 30 | 31 | > **USDm**: `"USDm"` 32 | 33 | Defined in: base/lib/currencies.d.ts:2 34 | -------------------------------------------------------------------------------- /docs/sdk/contractkit/variables/PROXY_SET_AND_INITIALIZE_IMPLEMENTATION_SIGNATURE.md: -------------------------------------------------------------------------------- 1 | [**@celo/contractkit v10.0.3**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/contractkit](../globals.md) / PROXY\_SET\_AND\_INITIALIZE\_IMPLEMENTATION\_SIGNATURE 6 | 7 | # Variable: PROXY\_SET\_AND\_INITIALIZE\_IMPLEMENTATION\_SIGNATURE 8 | 9 | > `const` **PROXY\_SET\_AND\_INITIALIZE\_IMPLEMENTATION\_SIGNATURE**: `string` = `SET_AND_INITIALIZE_IMPLEMENTATION_ABI.signature` 10 | 11 | Defined in: [contractkit/src/proxy.ts:110](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/proxy.ts#L110) 12 | -------------------------------------------------------------------------------- /docs/sdk/explorer/functions/newBlockExplorer.md: -------------------------------------------------------------------------------- 1 | [**@celo/explorer v5.0.18**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/explorer](../README.md) / newBlockExplorer 6 | 7 | # Function: newBlockExplorer() 8 | 9 | > **newBlockExplorer**(`kit`): `Promise`\<[`BlockExplorer`](../classes/BlockExplorer.md)\> 10 | 11 | Defined in: [block-explorer.ts:49](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/explorer/src/block-explorer.ts#L49) 12 | 13 | ## Parameters 14 | 15 | ### kit 16 | 17 | `ContractKit` 18 | 19 | ## Returns 20 | 21 | `Promise`\<[`BlockExplorer`](../classes/BlockExplorer.md)\> 22 | -------------------------------------------------------------------------------- /docs/sdk/metadata-claims/claim/variables/KeybaseClaimType.md: -------------------------------------------------------------------------------- 1 | [**@celo/metadata-claims v1.0.4**](../../README.md) 2 | 3 | *** 4 | 5 | [@celo/metadata-claims](../../README.md) / [claim](../README.md) / KeybaseClaimType 6 | 7 | # Variable: KeybaseClaimType 8 | 9 | > `const` **KeybaseClaimType**: `TypeC`\<\{ `timestamp`: `NumberC`; `type`: `LiteralC`\<[`KEYBASE`](../../types/enumerations/ClaimTypes.md#keybase)\>; `username`: `StringC`; \}\> 10 | 11 | Defined in: [packages/sdk/metadata-claims/src/claim.ts:7](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/metadata-claims/src/claim.ts#L7) 12 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/functions/privateKeyToPublicKey.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / privateKeyToPublicKey 6 | 7 | # Function: privateKeyToPublicKey() 8 | 9 | > **privateKeyToPublicKey**(`privateKey`): `string` 10 | 11 | Defined in: [packages/sdk/utils/src/address.ts:35](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/address.ts#L35) 12 | 13 | ## Parameters 14 | 15 | ### privateKey 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/chainIdTransformationForSigning.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / chainIdTransformationForSigning 6 | 7 | # Function: chainIdTransformationForSigning() 8 | 9 | > **chainIdTransformationForSigning**(`chainId`): `number` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L64) 12 | 13 | ## Parameters 14 | 15 | ### chainId 16 | 17 | `number` 18 | 19 | ## Returns 20 | 21 | `number` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/getDisplayNumberInternational.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / getDisplayNumberInternational 6 | 7 | # Function: getDisplayNumberInternational() 8 | 9 | > **getDisplayNumberInternational**(`e164PhoneNumber`): `string` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/phoneNumbers.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/phoneNumbers.ts#L58) 12 | 13 | ## Parameters 14 | 15 | ### e164PhoneNumber 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /docs/sdk/phone-utils/functions/validatePhone.md: -------------------------------------------------------------------------------- 1 | [**@celo/phone-utils v6.0.7**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/phone-utils](../globals.md) / validatePhone 6 | 7 | # Function: validatePhone() 8 | 9 | > **validatePhone**(`input`, `countryCallingCode?`): `string` 10 | 11 | Defined in: [packages/sdk/phone-utils/src/inputValidation.ts:4](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/phone-utils/src/inputValidation.ts#L4) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ### countryCallingCode? 20 | 21 | `string` 22 | 23 | ## Returns 24 | 25 | `string` 26 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/functions/isValidAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / isValidAddress 6 | 7 | # Function: isValidAddress() 8 | 9 | > **isValidAddress**(`input`): `` input is `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/utils/src/address.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/address.ts#L46) 12 | 13 | ## Parameters 14 | 15 | ### input 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` input is `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/getSignerFromTxEIP2718TX.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / getSignerFromTxEIP2718TX 6 | 7 | # Function: getSignerFromTxEIP2718TX() 8 | 9 | > **getSignerFromTxEIP2718TX**(`serializedTransaction`): `string` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:501](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L501) 12 | 13 | ## Parameters 14 | 15 | ### serializedTransaction 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `string` 22 | -------------------------------------------------------------------------------- /packages/sdk/base/src/string.ts: -------------------------------------------------------------------------------- 1 | export function appendPath(baseUrl: string, path: string) { 2 | const lastChar = baseUrl[baseUrl.length - 1] 3 | if (lastChar === '/') { 4 | return baseUrl + path 5 | } 6 | return baseUrl + '/' + path 7 | } 8 | 9 | // https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript 10 | export function normalizeAccents(str: string) { 11 | return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '') 12 | } 13 | 14 | export const StringBase = { 15 | appendPath, 16 | normalizeAccents, 17 | } 18 | 19 | export type HexString = `0x${string}` 20 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/Ok.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Ok 6 | 7 | # Function: Ok() 8 | 9 | > **Ok**\<`TResult`\>(`result`): [`OkResult`](../interfaces/OkResult.md)\<`TResult`\> 10 | 11 | Defined in: [packages/sdk/base/src/result.ts:12](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/result.ts#L12) 12 | 13 | ## Type Parameters 14 | 15 | ### TResult 16 | 17 | `TResult` 18 | 19 | ## Parameters 20 | 21 | ### result 22 | 23 | `TResult` 24 | 25 | ## Returns 26 | 27 | [`OkResult`](../interfaces/OkResult.md)\<`TResult`\> 28 | -------------------------------------------------------------------------------- /docs/sdk/base/functions/toFuture.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / toFuture 6 | 7 | # Function: toFuture() 8 | 9 | > **toFuture**\<`A`\>(`p`): [`Future`](../classes/Future.md)\<`A`\> 10 | 11 | Defined in: [packages/sdk/base/src/future.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L46) 12 | 13 | **`Internal`** 14 | 15 | ## Type Parameters 16 | 17 | ### A 18 | 19 | `A` 20 | 21 | ## Parameters 22 | 23 | ### p 24 | 25 | `Promise`\<`A`\> 26 | 27 | ## Returns 28 | 29 | [`Future`](../classes/Future.md)\<`A`\> 30 | -------------------------------------------------------------------------------- /docs/sdk/base/interfaces/BaseError.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / BaseError 6 | 7 | # Interface: BaseError\ 8 | 9 | Defined in: [packages/sdk/base/src/result.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/result.ts#L62) 10 | 11 | ## Type Parameters 12 | 13 | ### T 14 | 15 | `T` 16 | 17 | ## Properties 18 | 19 | ### errorType 20 | 21 | > **errorType**: `T` 22 | 23 | Defined in: [packages/sdk/base/src/result.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/result.ts#L63) 24 | -------------------------------------------------------------------------------- /docs/sdk/transactions-uri/functions/buildUri.md: -------------------------------------------------------------------------------- 1 | [**@celo/transactions-uri v5.0.15**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/transactions-uri](../README.md) / buildUri 6 | 7 | # Function: buildUri() 8 | 9 | > **buildUri**(`tx`, `functionName?`, `abiTypes?`): `string` 10 | 11 | Defined in: [tx-uri.ts:65](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L65) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `CeloTx` 18 | 19 | ### functionName? 20 | 21 | `string` 22 | 23 | ### abiTypes? 24 | 25 | `string`[] = `[]` 26 | 27 | ## Returns 28 | 29 | `string` 30 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/functions/publicKeyToAddress.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / publicKeyToAddress 6 | 7 | # Function: publicKeyToAddress() 8 | 9 | > **publicKeyToAddress**(`publicKey`): `` `0x${string}` `` 10 | 11 | Defined in: [packages/sdk/utils/src/address.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/address.ts#L38) 12 | 13 | ## Parameters 14 | 15 | ### publicKey 16 | 17 | `string` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /docs/sdk/utils/@celo/namespaces/AddressUtils/variables/findAddressIndex.md: -------------------------------------------------------------------------------- 1 | [**@celo/utils v8.0.3**](../../../../README.md) 2 | 3 | *** 4 | 5 | [@celo/utils](../../../../README.md) / [AddressUtils](../README.md) / findAddressIndex 6 | 7 | # Variable: findAddressIndex() 8 | 9 | > `const` **findAddressIndex**: (`address`, `addresses`) => `number` 10 | 11 | Defined in: packages/sdk/base/lib/address.d.ts:15 12 | 13 | ## Parameters 14 | 15 | ### address 16 | 17 | [`Address`](../type-aliases/Address.md) 18 | 19 | ### addresses 20 | 21 | [`Address`](../type-aliases/Address.md)[] 22 | 23 | ## Returns 24 | 25 | `number` 26 | -------------------------------------------------------------------------------- /docs/sdk/wallet-base/functions/stringNumberOrBNToHex.md: -------------------------------------------------------------------------------- 1 | [**@celo/wallet-base v8.0.2**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/wallet-base](../README.md) / stringNumberOrBNToHex 6 | 7 | # Function: stringNumberOrBNToHex() 8 | 9 | > **stringNumberOrBNToHex**(`num?`): `` `0x${string}` `` 10 | 11 | Defined in: [wallets/wallet-base/src/signing-utils.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L115) 12 | 13 | ## Parameters 14 | 15 | ### num? 16 | 17 | `string` | `number` | `bigint` | `BN` 18 | 19 | ## Returns 20 | 21 | `` `0x${string}` `` 22 | -------------------------------------------------------------------------------- /packages/actions/src/contracts/release-celo.ts: -------------------------------------------------------------------------------- 1 | import { releaseGoldABI } from '@celo/abis' 2 | import { Address, getContract, GetContractReturnType } from 'viem' 3 | import { Clients } from '../client.js' 4 | 5 | export async function getReleaseCeloContract( 6 | clients: T, 7 | address: Address 8 | ): Promise> { 9 | return getContract({ 10 | address, 11 | abi: releaseGoldABI, 12 | client: clients, 13 | }) 14 | } 15 | export type ReleaseCeloContract = GetContractReturnType< 16 | typeof releaseGoldABI, 17 | T 18 | > 19 | -------------------------------------------------------------------------------- /docs/sdk/base/type-aliases/Result.md: -------------------------------------------------------------------------------- 1 | [**@celo/base v7.0.4**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/base](../README.md) / Result 6 | 7 | # Type Alias: Result\ 8 | 9 | > **Result**\<`TResult`, `TError`\> = [`OkResult`](../interfaces/OkResult.md)\<`TResult`\> \| [`ErrorResult`](../interfaces/ErrorResult.md)\<`TError`\> 10 | 11 | Defined in: [packages/sdk/base/src/result.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/result.ts#L10) 12 | 13 | ## Type Parameters 14 | 15 | ### TResult 16 | 17 | `TResult` 18 | 19 | ### TError 20 | 21 | `TError` *extends* `Error` 22 | -------------------------------------------------------------------------------- /docs/sdk/governance/functions/isProxySetAndInitFunction.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / isProxySetAndInitFunction 6 | 7 | # Function: isProxySetAndInitFunction() 8 | 9 | > **isProxySetAndInitFunction**(`tx`): `boolean` 10 | 11 | Defined in: [proposals.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L102) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `Pick`\<[`ProposalTransactionJSON`](../interfaces/ProposalTransactionJSON.md), `"function"`\> 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | -------------------------------------------------------------------------------- /docs/sdk/governance/functions/isRegistryRepoint.md: -------------------------------------------------------------------------------- 1 | [**@celo/governance v5.1.9**](../README.md) 2 | 3 | *** 4 | 5 | [@celo/governance](../README.md) / isRegistryRepoint 6 | 7 | # Function: isRegistryRepoint() 8 | 9 | > **isRegistryRepoint**(`tx`): `boolean` 10 | 11 | Defined in: [proposals.ts:65](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/governance/src/proposals.ts#L65) 12 | 13 | ## Parameters 14 | 15 | ### tx 16 | 17 | `Pick`\<[`ExternalProposalTransactionJSON`](../type-aliases/ExternalProposalTransactionJSON.md), `"function"` \| `"contract"`\> 18 | 19 | ## Returns 20 | 21 | `boolean` 22 | --------------------------------------------------------------------------------