Versions in this module Expand all Collapse all v0 v0.0.9 Oct 29, 2024 v0.0.8 Oct 16, 2024 Changes in this version + const ErrAddressNotSet + const ErrChaincodeNotSet + const ErrChannelNotSet + const ErrNomineeAddressNotSet + const ErrPrincipalAddressNotSet + const ErrRightNotSet + const ErrRoleNotSet + const FnAddAddressRightForNominee + const FnAddRights + const FnRemoveAddressRightFromNominee + const FnRemoveRights + type AddressRight struct + Chaincode string + Channel string + NomineeAddress string + PrincipalAddress string + func (ar AddressRight) IsValid() error type Wallet + func (w *Wallet) AddAddressRightForNominee(right *AddressRight) error + func (w *Wallet) RemoveAddressRightFromNominee(right *AddressRight) error v0.0.7 Aug 30, 2024 v0.0.6 Aug 12, 2024 Changes in this version type Wallet + func (w *Wallet) GivenBalanceShouldBe(ch string, token string, expected uint64) v0.0.5 Jul 22, 2024 Changes in this version type Wallet + func (w *Wallet) ExecuteNoSignedInvoke(ch string, fn string, args ...string) ([]byte, error) + func (w *Wallet) TaskExecutorRequest(channel string, requests ...ExecutorRequest) ([]ExecutorResponse, error) + func (w *Wallet) TasksExecutor(channel string, tasks []*proto.Task) (*proto.BatchResponse, error) + func (w *Wallet) WithNonceSignArgs(ch, fn string, nonce string, args ...string) []string v0.0.4 Jul 15, 2024 v0.0.3 Jul 9, 2024 Changes in this version + type MockClientConn struct + func NewMockClientConn(ch string) *MockClientConn + func (m *MockClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, ...) error + func (m *MockClientConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error) + func (m *MockClientConn) SetCaller(caller *Wallet) *MockClientConn v0.0.2 Jun 11, 2024 Changes in this version + type ExecutorRequest struct + Args []string + Channel string + IsSignedInvoke bool + Method string + func NewExecutorRequest(ch string, fn string, args []string, isSignedInvoke bool) ExecutorRequest + type ExecutorResponse struct + BatchTxEvent *proto.BatchTxEvent + TxResponse *proto.TxResponse type Wallet + func (w *Wallet) ExecuteSignedInvoke(ch string, fn string, args ...string) ([]byte, error) + func (w *Wallet) TaskExecutor(r ExecutorRequest) (*ExecutorResponse, error) + func (w *Wallet) UseGOSTKey() + func (w *Wallet) UseSecp256k1Key() v0.0.1 May 4, 2024 Changes in this version + const AddRights + const RemoveRights + type BatchTxResponse map[string]*proto.TxResponse + func (br BatchTxResponse) TxHasNoError(t *testing.T, txID ...string) + type Fee struct + Cap *big.Int + Currency string + Fee *big.Int + Floor *big.Int + type IndustrialMetadata struct + Decimals uint + DeliveryForm string + Fee *Fee + Groups []MetadataGroup + Issuer string + Methods []string + Name string + PaymentTerms string + Price string + Rates []*MetadataRate + Symbol string + TokensForUnit string + UnderlyingAsset string + UnitOfMeasure string + type Ledger struct + func NewLedger(t *testing.T, options ...string) *Ledger + func (ledger *Ledger) GetPending(token string, txID ...string) + func (ledger *Ledger) GetStub(name string) *stub.Stub + func (ledger *Ledger) GetStubByKey(key string) *stub.Stub + func (ledger *Ledger) IndustrialMetadata(ch string) *IndustrialMetadata + func (ledger *Ledger) Metadata(ch string) *Metadata + func (ledger *Ledger) NewCC(name string, bci core.BaseContractInterface, config string, ...) string + func (ledger *Ledger) NewCCArgsArr(name string, bci core.BaseContractInterface, initArgs []string, ...) string + func (ledger *Ledger) NewMultisigWallet(n int) *Multisig + func (ledger *Ledger) NewWallet() *Wallet + func (ledger *Ledger) NewWalletFromHexKey(key string) *Wallet + func (ledger *Ledger) NewWalletFromKey(key string) *Wallet + func (ledger *Ledger) SetACL(aclStub *stub.Stub) + func (ledger *Ledger) UpdateStubTxID(stubName string, newTxID string) + func (ledger *Ledger) WaitChTransferTo(name string, id string, timeout time.Duration) + func (ledger *Ledger) WaitMultiSwapAnswer(name string, id string, timeout time.Duration) + func (ledger *Ledger) WaitSwapAnswer(name string, id string, timeout time.Duration) + type Metadata struct + Decimals uint + Fee *Fee + Issuer string + Methods []string + Name string + Rates []*MetadataRate + Symbol string + TotalEmission *big.Int + UnderlyingAsset string + func (m Metadata) MethodExists(method string) bool + type MetadataGroup struct + Amount *big.Int + MaturityDate time.Time + Name string + Note string + type MetadataRate struct + Currency string + DealType string + Max *big.Int + Min *big.Int + Rate *big.Int + type Multisig struct + func (w *Multisig) Address() string + func (w *Multisig) AddressType() *types.Address + func (w *Multisig) ChangeKeysFor(index int, sKey ed25519.PrivateKey) error + func (w *Multisig) PubKeys() []ed25519.PublicKey + func (w *Multisig) RawSignedInvoke(signCnt int, ch string, fn string, args ...string) (string, TxResponse, []*proto.Swap) + func (w *Multisig) SecretKeys() []ed25519.PrivateKey + type Right struct + Address string + Chaincode string + Channel string + Operation string + Role string + func (r Right) IsValid() error + type TxResponse struct + Accounting []*proto.AccountingRecord + Error string + Events map[string][]byte + Method string + Result string + type Wallet struct + func (w *Wallet) AddAccountRight(right *Right) error + func (w *Wallet) AddAllowedBalance(ch string, token string, amount uint64) + func (w *Wallet) AddBalance(ch string, amount uint64) + func (w *Wallet) AddGivenBalance(ch string, givenBalanceChannel string, amount uint64) + func (w *Wallet) AddTokenBalance(ch string, token string, amount uint64) + func (w *Wallet) Address() string + func (w *Wallet) AddressGOST() string + func (w *Wallet) AddressType() *types.Address + func (w *Wallet) AllowedBalanceShouldBe(ch string, token string, expected uint64) + func (w *Wallet) BalanceShouldBe(ch string, expected uint64) + func (w *Wallet) BatchedInvoke(ch, fn string, args ...string) (string, TxResponse) + func (w *Wallet) ChangeKeys(sKey ed25519.PrivateKey) error + func (w *Wallet) CheckGivenBalanceShouldBe(ch string, token string, expectedBalance uint64) + func (w *Wallet) DoBatch(ch string, txID ...string) BatchTxResponse + func (w *Wallet) GroupBalanceShouldBe(ch, group string, expected uint64) + func (w *Wallet) IndustrialBalanceShouldBe(ch, group string, expected uint64) + func (w *Wallet) Invoke(ch, fn string, args ...string) string + func (w *Wallet) InvokeReturnsTxID(ch, fn string, args ...string) string + func (w *Wallet) InvokeTraced(ctx context.Context, ch, fn string, args ...string) string + func (w *Wallet) InvokeWithError(ch, fn string, args ...string) error + func (w *Wallet) InvokeWithPeerResponse(ch, fn string, args ...string) (peer.Response, error) + func (w *Wallet) Ledger() *Ledger + func (w *Wallet) NbInvoke(ch string, fn string, args ...string) (string, string) + func (w *Wallet) NbInvokeTraced(ctx context.Context, ch string, fn string, args ...string) (string, string) + func (w *Wallet) OtfBalanceShouldBe(ch string, token string, expected uint64) + func (w *Wallet) OtfNbInvoke(ch string, fn string, args ...string) (string, string) + func (w *Wallet) PubKey() []byte + func (w *Wallet) RawChTransferInvoke(ch, fn string, args ...string) (string, TxResponse, error) + func (w *Wallet) RawChTransferInvokeWithBatch(ch string, fn string, args ...string) (string, TxResponse, error) + func (w *Wallet) RawSignedInvoke(ch string, fn string, args ...string) (string, TxResponse, []*proto.Swap) + func (w *Wallet) RawSignedInvokeTraced(ctx context.Context, ch, fn string, args ...string) (string, TxResponse, []*proto.Swap) + func (w *Wallet) RawSignedInvokeTracedWithErrorReturned(ctx context.Context, ch, fn string, args ...string) error + func (w *Wallet) RawSignedInvokeWithErrorReturned(ch, fn string, args ...string) error + func (w *Wallet) RawSignedMultiSwapInvoke(ch, fn string, args ...string) (string, TxResponse, []*proto.Swap, []*proto.MultiSwap) + func (w *Wallet) RawSignedMultiSwapInvokeTraced(ctx context.Context, ch, fn string, args ...string) (string, TxResponse, []*proto.Swap, []*proto.MultiSwap) + func (w *Wallet) RemoveAccountRight(right *Right) error + func (w *Wallet) SecretKey() []byte + func (w *Wallet) SetGOSTPrimary(primary bool) + func (w *Wallet) SetPubKey(pk ed25519.PublicKey) + func (w *Wallet) SignArgs(ch, fn string, args ...string) []string + func (w *Wallet) SignedInvoke(ch string, fn string, args ...string) string + func (w *Wallet) SignedInvokeTraced(ctx context.Context, ch, fn string, args ...string) string + func (w *Wallet) SignedMultiSwapsInvoke(ch string, fn string, args ...string) string