Documentation ¶
Index ¶
- Constants
- Variables
- func AESDecrypt(secret, b []byte) []byte
- func AESEncrypt(secret, b []byte, sid string) []byte
- func BuildChainAssetId(base, asset string) string
- func CheckTransactionPartiallySignedBy(raw, public string, chain byte) bool
- func ECDHEd25519(priv, pub string) [32]byte
- func GenerateAssetId(assetKey string) string
- func GetFactoryAssetAddress(receiver, assetId, symbol, name, holder string) common.Address
- func GetSafeBTCAssetId(reciever, assetId, holder, symbol, name string) (string, error)
- func HashMessageForSignature(msg string, chain byte) ([]byte, error)
- func ProposeAccount(operationId, publicKey string, owners []string, threshold, chain byte, ...) (*types.Operation, error)
- func ProposeBatchTransaction(operationId, publicKey string, typ byte, head string, hash []byte, chain byte) (*types.Operation, error)
- func ProposeTransaction(operationId, publicKey string, typ byte, head, destination string, chain byte) (*types.Operation, error)
- func SetFactoryContractAddress(address string)
- func SignSafeMessage(msg, priv string, chain byte) (string, error)
- func SignSafeTx(rawStr, privateStr string, chain byte) (string, error)
- func VerifyAssetKey(assetKey string) error
- func VerifySafeMessage(public string, msg, sig []byte, chain byte) error
Constants ¶
View Source
const ( TestFactoryContractAddress = "0x4D17777E0AC12C6a0d4DEF1204278cFEAe142a1E" ProdFactoryContractAddress = "0x3c763e46456915922a4647a1E3f3B8916c93171e" SafeChainBitcoin = 1 SafeChainEthereum = 2 SafeChainMixin = 3 SafeChainMVM = 4 SafeChainLitecoin = 5 SafeChainPolygon = 6 SafeBitcoinChainId = "c6d0c728-2624-429b-8e0d-d9d19b6592fa" SafeLitecoinChainId = "76c802a2-7c88-447f-a93e-c29c9e5dd9c8" SafeEthereumChainId = "43d61dcd-e413-450d-80b8-101d5e903357" SafeMVMChainId = "a0ffd769-5850-4b48-9651-d2ae44a3e64d" SafePolygonChainId = "b7938396-3f94-4e0a-9179-d3440718156f" )
View Source
const ( BitcoinAssetId = "c6d0c728-2624-429b-8e0d-d9d19b6592fa" PusdAssetId = "31d2ea9c-95eb-3355-b65b-ba096853bc18" CurveSecp256k1ECDSABitcoin = 1 CurveSecp256k1ECDSAEthereum = 2 CurveSecp256k1ECDSALitecoin = 100 + CurveSecp256k1ECDSABitcoin CurveSecp256k1ECDSAMVM = 100 + CurveSecp256k1ECDSAEthereum CurveSecp256k1ECDSAPolygon = 110 + CurveSecp256k1ECDSAEthereum // For all Bitcoin like chains ActionBitcoinSafeProposeAccount = 110 ActionBitcoinSafeApproveAccount = 111 ActionBitcoinSafeProposeTransaction = 112 ActionBitcoinSafeApproveTransaction = 113 ActionBitcoinSafeRevokeTransaction = 114 ActionBitcoinSafeCloseAccount = 115 // For all Ethereum like chains ActionEthereumSafeProposeAccount = 130 ActionEthereumSafeApproveAccount = 131 ActionEthereumSafeProposeTransaction = 132 ActionEthereumSafeApproveTransaction = 133 ActionEthereumSafeRevokeTransaction = 134 ActionEthereumSafeCloseAccount = 135 ActionEthereumSafeRefundTransaction = 136 TransactionTypeNormal = 0 TransactionTypeRecovery = 1 )
Variables ¶
View Source
var ( PolygonChainBase string PolygonChainId crypto.Hash )
Functions ¶
func AESDecrypt ¶
func AESEncrypt ¶
func BuildChainAssetId ¶
func ECDHEd25519 ¶
func GenerateAssetId ¶
func GetFactoryAssetAddress ¶
func GetSafeBTCAssetId ¶
func ProposeAccount ¶
func ProposeBatchTransaction ¶
func ProposeTransaction ¶
func SetFactoryContractAddress ¶
func SetFactoryContractAddress(address string)
func VerifyAssetKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.