@gnolang/gnonative 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/libs/gnocore.aar +0 -0
- package/build/api/GnoNativeApi.d.ts +4 -4
- package/build/api/GnoNativeApi.d.ts.map +1 -1
- package/build/api/GnoNativeApi.js +40 -56
- package/build/api/GnoNativeApi.js.map +1 -1
- package/build/api/vendor/gnonativetypes_pb.d.ts +564 -743
- package/build/api/vendor/gnonativetypes_pb.d.ts.map +1 -1
- package/build/api/vendor/gnonativetypes_pb.js +376 -2503
- package/build/api/vendor/gnonativetypes_pb.js.map +1 -1
- package/build/api/vendor/rpc_pb.d.ts +440 -15
- package/build/api/vendor/rpc_pb.d.ts.map +1 -1
- package/build/api/vendor/rpc_pb.js +20 -70
- package/build/api/vendor/rpc_pb.js.map +1 -1
- package/build/grpc/client.d.ts +3 -3
- package/build/grpc/client.d.ts.map +1 -1
- package/build/grpc/client.js +3 -3
- package/build/grpc/client.js.map +1 -1
- package/build/grpc/transport_native.d.ts.map +1 -1
- package/build/grpc/transport_native.js +20 -25
- package/build/grpc/transport_native.js.map +1 -1
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/GnoCore +0 -0
- package/package.json +4 -4
- package/src/api/GnoNativeApi.ts +71 -143
- package/src/api/vendor/gnonativetypes_pb.ts +757 -2204
- package/src/api/vendor/rpc_pb.ts +451 -75
- package/src/grpc/client.ts +4 -4
- package/src/grpc/transport_native.ts +35 -36
- package/build/api/vendor/rpc_connect.d.ts +0 -461
- package/build/api/vendor/rpc_connect.d.ts.map +0 -1
- package/build/api/vendor/rpc_connect.js +0 -465
- package/build/api/vendor/rpc_connect.js.map +0 -1
- package/src/api/vendor/rpc_connect.ts +0 -467
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
DescMessage,
|
|
3
|
+
DescMethodUnary,
|
|
4
|
+
DescMethodStreaming,
|
|
5
|
+
MessageShape,
|
|
6
|
+
MessageInitShape,
|
|
7
|
+
} from '@bufbuild/protobuf';
|
|
8
|
+
import { toJsonString } from '@bufbuild/protobuf';
|
|
3
9
|
import type {
|
|
4
10
|
ContextValues,
|
|
5
11
|
StreamResponse,
|
|
@@ -14,7 +20,7 @@ import {
|
|
|
14
20
|
runStreamingCall,
|
|
15
21
|
runUnaryCall,
|
|
16
22
|
} from '@connectrpc/connect/protocol';
|
|
17
|
-
import { requestHeader } from '@connectrpc/connect/protocol-
|
|
23
|
+
import { requestHeader } from '@connectrpc/connect/protocol-connect';
|
|
18
24
|
import { GrpcWebTransportOptions } from '@connectrpc/connect-web';
|
|
19
25
|
import { toByteArray } from 'base64-js';
|
|
20
26
|
import { CodedError } from 'expo-modules-core';
|
|
@@ -24,13 +30,12 @@ import { GoBridge } from '../GoBridge';
|
|
|
24
30
|
export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Transport {
|
|
25
31
|
const useBinaryFormat = options.useBinaryFormat ?? true;
|
|
26
32
|
return {
|
|
27
|
-
async unary<I extends
|
|
28
|
-
|
|
29
|
-
method: MethodInfo<I, O>,
|
|
33
|
+
async unary<I extends DescMessage, O extends DescMessage>(
|
|
34
|
+
method: DescMethodUnary<I, O>,
|
|
30
35
|
signal: AbortSignal | undefined,
|
|
31
36
|
timeoutMs: number | undefined,
|
|
32
37
|
header: HeadersInit | undefined,
|
|
33
|
-
message:
|
|
38
|
+
message: MessageInitShape<I>,
|
|
34
39
|
contextValues?: ContextValues,
|
|
35
40
|
): Promise<UnaryResponse<I, O>> {
|
|
36
41
|
const { parse } = createClientMethodSerializers(
|
|
@@ -45,23 +50,18 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
45
50
|
interceptors: options.interceptors,
|
|
46
51
|
req: {
|
|
47
52
|
stream: false,
|
|
48
|
-
service,
|
|
53
|
+
service: method.parent,
|
|
49
54
|
method,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
mode: 'cors',
|
|
54
|
-
},
|
|
55
|
-
header: new Headers(),
|
|
55
|
+
requestMethod: 'POST',
|
|
56
|
+
url: createMethodUrl(options.baseUrl, method),
|
|
57
|
+
header: requestHeader(method.methodKind, useBinaryFormat, timeoutMs, header, false),
|
|
56
58
|
contextValues: contextValues ?? createContextValues(),
|
|
57
59
|
message,
|
|
58
60
|
},
|
|
59
61
|
next: async (req: UnaryRequest<I, O>): Promise<UnaryResponse<I, O>> => {
|
|
60
62
|
try {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
req.message.toJsonString(),
|
|
64
|
-
);
|
|
63
|
+
const messageJson = toJsonString(req.method.input, req.message);
|
|
64
|
+
const res = await GoBridge.invokeGrpcMethod(req.method.name, messageJson);
|
|
65
65
|
|
|
66
66
|
const header: Headers | undefined = new Headers();
|
|
67
67
|
const trailer: Headers | undefined = new Headers();
|
|
@@ -71,7 +71,7 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
71
71
|
|
|
72
72
|
return {
|
|
73
73
|
stream: false,
|
|
74
|
-
service,
|
|
74
|
+
service: method.parent,
|
|
75
75
|
method,
|
|
76
76
|
header,
|
|
77
77
|
message,
|
|
@@ -85,13 +85,12 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
85
85
|
});
|
|
86
86
|
},
|
|
87
87
|
|
|
88
|
-
async stream<I extends
|
|
89
|
-
|
|
90
|
-
method: MethodInfo<I, O>,
|
|
88
|
+
async stream<I extends DescMessage, O extends DescMessage>(
|
|
89
|
+
method: DescMethodStreaming<I, O>,
|
|
91
90
|
signal: AbortSignal | undefined,
|
|
92
91
|
timeoutMs: number | undefined,
|
|
93
92
|
header: HeadersInit | undefined,
|
|
94
|
-
input: AsyncIterable<
|
|
93
|
+
input: AsyncIterable<MessageInitShape<I>>,
|
|
95
94
|
contextValues?: ContextValues,
|
|
96
95
|
): Promise<StreamResponse<I, O>> {
|
|
97
96
|
const { parse } = createClientMethodSerializers(
|
|
@@ -101,8 +100,11 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
101
100
|
options.binaryOptions,
|
|
102
101
|
);
|
|
103
102
|
|
|
104
|
-
async function createRequestBody(
|
|
105
|
-
|
|
103
|
+
async function createRequestBody(
|
|
104
|
+
schema: DescMessage,
|
|
105
|
+
input: AsyncIterable<MessageShape<I>>,
|
|
106
|
+
): Promise<string> {
|
|
107
|
+
if (method.methodKind !== 'server_streaming') {
|
|
106
108
|
throw 'The fetch API does not support streaming request bodies';
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -111,7 +113,8 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
111
113
|
throw 'missing request message';
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
const messageJson = toJsonString(schema, r.value);
|
|
117
|
+
return messageJson;
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
return await runStreamingCall<I, O>({
|
|
@@ -120,15 +123,11 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
120
123
|
signal,
|
|
121
124
|
req: {
|
|
122
125
|
stream: true,
|
|
123
|
-
service,
|
|
126
|
+
service: method.parent,
|
|
124
127
|
method,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
credentials: options.credentials ?? 'same-origin',
|
|
129
|
-
mode: 'cors',
|
|
130
|
-
},
|
|
131
|
-
header: requestHeader(useBinaryFormat, timeoutMs, header, false),
|
|
128
|
+
requestMethod: 'POST',
|
|
129
|
+
url: createMethodUrl(options.baseUrl, method),
|
|
130
|
+
header: requestHeader(method.methodKind, useBinaryFormat, timeoutMs, header, false),
|
|
132
131
|
message: input,
|
|
133
132
|
contextValues: contextValues ?? createContextValues(),
|
|
134
133
|
},
|
|
@@ -136,7 +135,7 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
136
135
|
const header: Headers | undefined = new Headers();
|
|
137
136
|
const trailer: Headers | undefined = new Headers();
|
|
138
137
|
|
|
139
|
-
const body = await createRequestBody(req.message);
|
|
138
|
+
const body = await createRequestBody(req.method.input, req.message);
|
|
140
139
|
|
|
141
140
|
let streamId: string;
|
|
142
141
|
try {
|
|
@@ -148,7 +147,7 @@ export function createNativeGrpcTransport(options: GrpcWebTransportOptions): Tra
|
|
|
148
147
|
|
|
149
148
|
const generator = {
|
|
150
149
|
async *[Symbol.asyncIterator]() {
|
|
151
|
-
for (
|
|
150
|
+
for (;;) {
|
|
152
151
|
try {
|
|
153
152
|
const res = await GoBridge.streamClientReceive(streamId);
|
|
154
153
|
const data = toByteArray(res);
|
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
import { ActivateAccountRequest, ActivateAccountResponse, AddressFromBech32Request, AddressFromBech32Response, AddressFromMnemonicRequest, AddressFromMnemonicResponse, AddressToBech32Request, AddressToBech32Response, BroadcastTxCommitRequest, BroadcastTxCommitResponse, CallRequest, CallResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountRequest, DeleteAccountResponse, EstimateGasRequest, EstimateGasResponse, GenerateRecoveryPhraseRequest, GenerateRecoveryPhraseResponse, GetActivatedAccountRequest, GetActivatedAccountResponse, GetChainIDRequest, GetChainIDResponse, GetKeyInfoByAddressRequest, GetKeyInfoByAddressResponse, GetKeyInfoByNameOrAddressRequest, GetKeyInfoByNameOrAddressResponse, GetKeyInfoByNameRequest, GetKeyInfoByNameResponse, GetRemoteRequest, GetRemoteResponse, HasKeyByAddressRequest, HasKeyByAddressResponse, HasKeyByNameOrAddressRequest, HasKeyByNameOrAddressResponse, HasKeyByNameRequest, HasKeyByNameResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse, ListKeyInfoRequest, ListKeyInfoResponse, MakeTxResponse, QEvalRequest, QEvalResponse, QueryAccountRequest, QueryAccountResponse, QueryRequest, QueryResponse, RenderRequest, RenderResponse, RotatePasswordRequest, RotatePasswordResponse, RunRequest, RunResponse, SendRequest, SendResponse, SetChainIDRequest, SetChainIDResponse, SetPasswordRequest, SetPasswordResponse, SetRemoteRequest, SetRemoteResponse, SignTxRequest, SignTxResponse } from "./gnonativetypes_pb.js";
|
|
2
|
-
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
|
-
/**
|
|
4
|
-
* GnoNativeService is the service to interact with the Gno blockchain
|
|
5
|
-
*
|
|
6
|
-
* @generated from service land.gno.gnonative.v1.GnoNativeService
|
|
7
|
-
*/
|
|
8
|
-
export declare const GnoNativeService: {
|
|
9
|
-
readonly typeName: "land.gno.gnonative.v1.GnoNativeService";
|
|
10
|
-
readonly methods: {
|
|
11
|
-
/**
|
|
12
|
-
* Set the connection address for the remote node. If you don't call this,
|
|
13
|
-
* the default is "127.0.0.1:26657"
|
|
14
|
-
*
|
|
15
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetRemote
|
|
16
|
-
*/
|
|
17
|
-
readonly setRemote: {
|
|
18
|
-
readonly name: "SetRemote";
|
|
19
|
-
readonly I: typeof SetRemoteRequest;
|
|
20
|
-
readonly O: typeof SetRemoteResponse;
|
|
21
|
-
readonly kind: MethodKind.Unary;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Get the connection address for the remote node. The response is either
|
|
25
|
-
* the initial default, or the value which was set with SetRemote
|
|
26
|
-
*
|
|
27
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetRemote
|
|
28
|
-
*/
|
|
29
|
-
readonly getRemote: {
|
|
30
|
-
readonly name: "GetRemote";
|
|
31
|
-
readonly I: typeof GetRemoteRequest;
|
|
32
|
-
readonly O: typeof GetRemoteResponse;
|
|
33
|
-
readonly kind: MethodKind.Unary;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Set the chain ID for the remote node. If you don't call this, the default
|
|
37
|
-
* is "dev"
|
|
38
|
-
*
|
|
39
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetChainID
|
|
40
|
-
*/
|
|
41
|
-
readonly setChainID: {
|
|
42
|
-
readonly name: "SetChainID";
|
|
43
|
-
readonly I: typeof SetChainIDRequest;
|
|
44
|
-
readonly O: typeof SetChainIDResponse;
|
|
45
|
-
readonly kind: MethodKind.Unary;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Get the chain ID for the remote node. The response is either
|
|
49
|
-
* the initial default, or the value which was set with SetChainID
|
|
50
|
-
*
|
|
51
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetChainID
|
|
52
|
-
*/
|
|
53
|
-
readonly getChainID: {
|
|
54
|
-
readonly name: "GetChainID";
|
|
55
|
-
readonly I: typeof GetChainIDRequest;
|
|
56
|
-
readonly O: typeof GetChainIDResponse;
|
|
57
|
-
readonly kind: MethodKind.Unary;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Generate a recovery phrase of BIP39 mnemonic words using entropy from the
|
|
61
|
-
* crypto library random number generator. This can be used as the mnemonic in
|
|
62
|
-
* CreateAccount.
|
|
63
|
-
*
|
|
64
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GenerateRecoveryPhrase
|
|
65
|
-
*/
|
|
66
|
-
readonly generateRecoveryPhrase: {
|
|
67
|
-
readonly name: "GenerateRecoveryPhrase";
|
|
68
|
-
readonly I: typeof GenerateRecoveryPhraseRequest;
|
|
69
|
-
readonly O: typeof GenerateRecoveryPhraseResponse;
|
|
70
|
-
readonly kind: MethodKind.Unary;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Get the information for all keys in the keybase
|
|
74
|
-
*
|
|
75
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.ListKeyInfo
|
|
76
|
-
*/
|
|
77
|
-
readonly listKeyInfo: {
|
|
78
|
-
readonly name: "ListKeyInfo";
|
|
79
|
-
readonly I: typeof ListKeyInfoRequest;
|
|
80
|
-
readonly O: typeof ListKeyInfoResponse;
|
|
81
|
-
readonly kind: MethodKind.Unary;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Check for the key in the keybase with the given name.
|
|
85
|
-
* In the response, set has true if the keybase has the key.
|
|
86
|
-
*
|
|
87
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByName
|
|
88
|
-
*/
|
|
89
|
-
readonly hasKeyByName: {
|
|
90
|
-
readonly name: "HasKeyByName";
|
|
91
|
-
readonly I: typeof HasKeyByNameRequest;
|
|
92
|
-
readonly O: typeof HasKeyByNameResponse;
|
|
93
|
-
readonly kind: MethodKind.Unary;
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Check for the key in the keybase with the given address.
|
|
97
|
-
* In the response, set has true if the keybase has the key.
|
|
98
|
-
*
|
|
99
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByAddress
|
|
100
|
-
*/
|
|
101
|
-
readonly hasKeyByAddress: {
|
|
102
|
-
readonly name: "HasKeyByAddress";
|
|
103
|
-
readonly I: typeof HasKeyByAddressRequest;
|
|
104
|
-
readonly O: typeof HasKeyByAddressResponse;
|
|
105
|
-
readonly kind: MethodKind.Unary;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Check for the key in the keybase with the given name or bech32 string address.
|
|
109
|
-
* In the response, set has true if the keybase has the key.
|
|
110
|
-
*
|
|
111
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByNameOrAddress
|
|
112
|
-
*/
|
|
113
|
-
readonly hasKeyByNameOrAddress: {
|
|
114
|
-
readonly name: "HasKeyByNameOrAddress";
|
|
115
|
-
readonly I: typeof HasKeyByNameOrAddressRequest;
|
|
116
|
-
readonly O: typeof HasKeyByNameOrAddressResponse;
|
|
117
|
-
readonly kind: MethodKind.Unary;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Get the information for the key in the keybase with the given name.
|
|
121
|
-
* If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound.
|
|
122
|
-
*
|
|
123
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByName
|
|
124
|
-
*/
|
|
125
|
-
readonly getKeyInfoByName: {
|
|
126
|
-
readonly name: "GetKeyInfoByName";
|
|
127
|
-
readonly I: typeof GetKeyInfoByNameRequest;
|
|
128
|
-
readonly O: typeof GetKeyInfoByNameResponse;
|
|
129
|
-
readonly kind: MethodKind.Unary;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Get the information for the key in the keybase with the given address.
|
|
133
|
-
* If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound.
|
|
134
|
-
*
|
|
135
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByAddress
|
|
136
|
-
*/
|
|
137
|
-
readonly getKeyInfoByAddress: {
|
|
138
|
-
readonly name: "GetKeyInfoByAddress";
|
|
139
|
-
readonly I: typeof GetKeyInfoByAddressRequest;
|
|
140
|
-
readonly O: typeof GetKeyInfoByAddressResponse;
|
|
141
|
-
readonly kind: MethodKind.Unary;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Get the information for the key in the keybase with the given name or bech32 string address.
|
|
145
|
-
* If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound.
|
|
146
|
-
*
|
|
147
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByNameOrAddress
|
|
148
|
-
*/
|
|
149
|
-
readonly getKeyInfoByNameOrAddress: {
|
|
150
|
-
readonly name: "GetKeyInfoByNameOrAddress";
|
|
151
|
-
readonly I: typeof GetKeyInfoByNameOrAddressRequest;
|
|
152
|
-
readonly O: typeof GetKeyInfoByNameOrAddressResponse;
|
|
153
|
-
readonly kind: MethodKind.Unary;
|
|
154
|
-
};
|
|
155
|
-
/**
|
|
156
|
-
* Create a new account in the keybase using the name and password specified by SetAccount.
|
|
157
|
-
* If an account with the same name already exists in the keybase,
|
|
158
|
-
* this replaces it. (If you don't want to replace it, then it's your responsibility
|
|
159
|
-
* to use GetKeyInfoByName to check if it exists before calling this.)
|
|
160
|
-
*
|
|
161
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.CreateAccount
|
|
162
|
-
*/
|
|
163
|
-
readonly createAccount: {
|
|
164
|
-
readonly name: "CreateAccount";
|
|
165
|
-
readonly I: typeof CreateAccountRequest;
|
|
166
|
-
readonly O: typeof CreateAccountResponse;
|
|
167
|
-
readonly kind: MethodKind.Unary;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Find the account in the keybase with the given name_or_bech32 and activate it. If the response has_password is
|
|
171
|
-
* false, then you should call SetPassword before using a method which needs it.
|
|
172
|
-
* If the account is already activated, return its info.
|
|
173
|
-
* If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound.
|
|
174
|
-
*
|
|
175
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.ActivateAccount
|
|
176
|
-
*/
|
|
177
|
-
readonly activateAccount: {
|
|
178
|
-
readonly name: "ActivateAccount";
|
|
179
|
-
readonly I: typeof ActivateAccountRequest;
|
|
180
|
-
readonly O: typeof ActivateAccountResponse;
|
|
181
|
-
readonly kind: MethodKind.Unary;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Set the password for the account in the keybase with the given address.
|
|
185
|
-
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
186
|
-
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
|
|
187
|
-
*
|
|
188
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetPassword
|
|
189
|
-
*/
|
|
190
|
-
readonly setPassword: {
|
|
191
|
-
readonly name: "SetPassword";
|
|
192
|
-
readonly I: typeof SetPasswordRequest;
|
|
193
|
-
readonly O: typeof SetPasswordResponse;
|
|
194
|
-
readonly kind: MethodKind.Unary;
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Rotate the password of a key to a new password for the accounts in the keybase with the given addresses.
|
|
198
|
-
* Before calling this, you must call SetPassword with the current password for each account.
|
|
199
|
-
* If there is an error, then roll back all accounts to the current password.
|
|
200
|
-
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
201
|
-
*
|
|
202
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.RotatePassword
|
|
203
|
-
*/
|
|
204
|
-
readonly rotatePassword: {
|
|
205
|
-
readonly name: "RotatePassword";
|
|
206
|
-
readonly I: typeof RotatePasswordRequest;
|
|
207
|
-
readonly O: typeof RotatePasswordResponse;
|
|
208
|
-
readonly kind: MethodKind.Unary;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* GetActivatedAccount gets the info of the account by address which has been activated by ActivateAccount.
|
|
212
|
-
* If there the given address is not specified, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrInvalidAddress.
|
|
213
|
-
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
214
|
-
*
|
|
215
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetActivatedAccount
|
|
216
|
-
*/
|
|
217
|
-
readonly getActivatedAccount: {
|
|
218
|
-
readonly name: "GetActivatedAccount";
|
|
219
|
-
readonly I: typeof GetActivatedAccountRequest;
|
|
220
|
-
readonly O: typeof GetActivatedAccountResponse;
|
|
221
|
-
readonly kind: MethodKind.Unary;
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* QueryAccount retrieves account information from the blockchain for a given
|
|
225
|
-
* address.
|
|
226
|
-
*
|
|
227
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.QueryAccount
|
|
228
|
-
*/
|
|
229
|
-
readonly queryAccount: {
|
|
230
|
-
readonly name: "QueryAccount";
|
|
231
|
-
readonly I: typeof QueryAccountRequest;
|
|
232
|
-
readonly O: typeof QueryAccountResponse;
|
|
233
|
-
readonly kind: MethodKind.Unary;
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* DeleteAccount deletes the account with the given name, using the password
|
|
237
|
-
* to ensure access. However, if skip_password is true, then ignore the
|
|
238
|
-
* password.
|
|
239
|
-
* If the account doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound.
|
|
240
|
-
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
|
|
241
|
-
*
|
|
242
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.DeleteAccount
|
|
243
|
-
*/
|
|
244
|
-
readonly deleteAccount: {
|
|
245
|
-
readonly name: "DeleteAccount";
|
|
246
|
-
readonly I: typeof DeleteAccountRequest;
|
|
247
|
-
readonly O: typeof DeleteAccountResponse;
|
|
248
|
-
readonly kind: MethodKind.Unary;
|
|
249
|
-
};
|
|
250
|
-
/**
|
|
251
|
-
* Make an ABCI query to the remote node.
|
|
252
|
-
* If the request path is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest.
|
|
253
|
-
* If the request data has a package path that is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrInvalidPkgPath.
|
|
254
|
-
*
|
|
255
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Query
|
|
256
|
-
*/
|
|
257
|
-
readonly query: {
|
|
258
|
-
readonly name: "Query";
|
|
259
|
-
readonly I: typeof QueryRequest;
|
|
260
|
-
readonly O: typeof QueryResponse;
|
|
261
|
-
readonly kind: MethodKind.Unary;
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* Render calls the Render function for package_path with optional args. The
|
|
265
|
-
* package path should include the prefix like "gno.land/". This is similar to
|
|
266
|
-
* using a browser URL <nodeURL>/<pkgPath>:<args> where <pkgPath> doesn't have
|
|
267
|
-
* the prefix like "gno.land/".
|
|
268
|
-
* If the request package_path is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrInvalidPkgPath.
|
|
269
|
-
*
|
|
270
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Render
|
|
271
|
-
*/
|
|
272
|
-
readonly render: {
|
|
273
|
-
readonly name: "Render";
|
|
274
|
-
readonly I: typeof RenderRequest;
|
|
275
|
-
readonly O: typeof RenderResponse;
|
|
276
|
-
readonly kind: MethodKind.Unary;
|
|
277
|
-
};
|
|
278
|
-
/**
|
|
279
|
-
* QEval evaluates the given expression with the realm code at package_path.
|
|
280
|
-
* The package path should include the prefix like "gno.land/". The expression
|
|
281
|
-
* is usually a function call like "GetBoardIDFromName(\"testboard\")". The
|
|
282
|
-
* return value is a typed expression like
|
|
283
|
-
* "(1 gno.land/r/demo/boards.BoardID)\n(true bool)".
|
|
284
|
-
* If the request package_path is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrInvalidPkgPath.
|
|
285
|
-
*
|
|
286
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.QEval
|
|
287
|
-
*/
|
|
288
|
-
readonly qEval: {
|
|
289
|
-
readonly name: "QEval";
|
|
290
|
-
readonly I: typeof QEvalRequest;
|
|
291
|
-
readonly O: typeof QEvalResponse;
|
|
292
|
-
readonly kind: MethodKind.Unary;
|
|
293
|
-
};
|
|
294
|
-
/**
|
|
295
|
-
* Call a specific realm function. Sign the transaction with the given caller_address.
|
|
296
|
-
* If there is no activated account with the given caller_address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
297
|
-
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
|
|
298
|
-
* If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest.
|
|
299
|
-
*
|
|
300
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Call
|
|
301
|
-
*/
|
|
302
|
-
readonly call: {
|
|
303
|
-
readonly name: "Call";
|
|
304
|
-
readonly I: typeof CallRequest;
|
|
305
|
-
readonly O: typeof CallResponse;
|
|
306
|
-
readonly kind: MethodKind.ServerStreaming;
|
|
307
|
-
};
|
|
308
|
-
/**
|
|
309
|
-
* Send currency from the account with the given caller_address to an account on the blockchain.
|
|
310
|
-
* If there is no activated account with the given caller_address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
311
|
-
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
|
|
312
|
-
*
|
|
313
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Send
|
|
314
|
-
*/
|
|
315
|
-
readonly send: {
|
|
316
|
-
readonly name: "Send";
|
|
317
|
-
readonly I: typeof SendRequest;
|
|
318
|
-
readonly O: typeof SendResponse;
|
|
319
|
-
readonly kind: MethodKind.ServerStreaming;
|
|
320
|
-
};
|
|
321
|
-
/**
|
|
322
|
-
* Temporarily load the code in package on the blockchain and run main() which can
|
|
323
|
-
* call realm functions and use println() to output to the "console". Sign the transaction with the given caller_address.
|
|
324
|
-
* This returns the "console" output.
|
|
325
|
-
* If there is no activated account with the given caller_address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
326
|
-
*
|
|
327
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Run
|
|
328
|
-
*/
|
|
329
|
-
readonly run: {
|
|
330
|
-
readonly name: "Run";
|
|
331
|
-
readonly I: typeof RunRequest;
|
|
332
|
-
readonly O: typeof RunResponse;
|
|
333
|
-
readonly kind: MethodKind.ServerStreaming;
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* Make an unsigned transaction to call a specific realm function.
|
|
337
|
-
*
|
|
338
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.MakeCallTx
|
|
339
|
-
*/
|
|
340
|
-
readonly makeCallTx: {
|
|
341
|
-
readonly name: "MakeCallTx";
|
|
342
|
-
readonly I: typeof CallRequest;
|
|
343
|
-
readonly O: typeof MakeTxResponse;
|
|
344
|
-
readonly kind: MethodKind.Unary;
|
|
345
|
-
};
|
|
346
|
-
/**
|
|
347
|
-
* Make an unsigned transaction to send currency to an account on the blockchain.
|
|
348
|
-
*
|
|
349
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.MakeSendTx
|
|
350
|
-
*/
|
|
351
|
-
readonly makeSendTx: {
|
|
352
|
-
readonly name: "MakeSendTx";
|
|
353
|
-
readonly I: typeof SendRequest;
|
|
354
|
-
readonly O: typeof MakeTxResponse;
|
|
355
|
-
readonly kind: MethodKind.Unary;
|
|
356
|
-
};
|
|
357
|
-
/**
|
|
358
|
-
* Make an unsigned transaction to temporarily load the code in package on the blockchain and run main().
|
|
359
|
-
*
|
|
360
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.MakeRunTx
|
|
361
|
-
*/
|
|
362
|
-
readonly makeRunTx: {
|
|
363
|
-
readonly name: "MakeRunTx";
|
|
364
|
-
readonly I: typeof RunRequest;
|
|
365
|
-
readonly O: typeof MakeTxResponse;
|
|
366
|
-
readonly kind: MethodKind.Unary;
|
|
367
|
-
};
|
|
368
|
-
/**
|
|
369
|
-
* EstimateGas estimate the least amount of gas required for the transaction to go through on the chain (minimum gas wanted), with a security margin.
|
|
370
|
-
* If UpdateTx is true, then update the transaction with the gasWanted amount.
|
|
371
|
-
*
|
|
372
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.EstimateGas
|
|
373
|
-
*/
|
|
374
|
-
readonly estimateGas: {
|
|
375
|
-
readonly name: "EstimateGas";
|
|
376
|
-
readonly I: typeof EstimateGasRequest;
|
|
377
|
-
readonly O: typeof EstimateGasResponse;
|
|
378
|
-
readonly kind: MethodKind.Unary;
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* Sign the transaction using the account with the given address.
|
|
382
|
-
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
|
|
383
|
-
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
|
|
384
|
-
*
|
|
385
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.SignTx
|
|
386
|
-
*/
|
|
387
|
-
readonly signTx: {
|
|
388
|
-
readonly name: "SignTx";
|
|
389
|
-
readonly I: typeof SignTxRequest;
|
|
390
|
-
readonly O: typeof SignTxResponse;
|
|
391
|
-
readonly kind: MethodKind.Unary;
|
|
392
|
-
};
|
|
393
|
-
/**
|
|
394
|
-
* Broadcast the signed transaction to the blockchain configured in GetRemote and return a stream result.
|
|
395
|
-
*
|
|
396
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.BroadcastTxCommit
|
|
397
|
-
*/
|
|
398
|
-
readonly broadcastTxCommit: {
|
|
399
|
-
readonly name: "BroadcastTxCommit";
|
|
400
|
-
readonly I: typeof BroadcastTxCommitRequest;
|
|
401
|
-
readonly O: typeof BroadcastTxCommitResponse;
|
|
402
|
-
readonly kind: MethodKind.ServerStreaming;
|
|
403
|
-
};
|
|
404
|
-
/**
|
|
405
|
-
* Convert a byte array address to a bech32 string address.
|
|
406
|
-
*
|
|
407
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressToBech32
|
|
408
|
-
*/
|
|
409
|
-
readonly addressToBech32: {
|
|
410
|
-
readonly name: "AddressToBech32";
|
|
411
|
-
readonly I: typeof AddressToBech32Request;
|
|
412
|
-
readonly O: typeof AddressToBech32Response;
|
|
413
|
-
readonly kind: MethodKind.Unary;
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* Convert a bech32 string address to a byte array address.
|
|
417
|
-
*
|
|
418
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromBech32
|
|
419
|
-
*/
|
|
420
|
-
readonly addressFromBech32: {
|
|
421
|
-
readonly name: "AddressFromBech32";
|
|
422
|
-
readonly I: typeof AddressFromBech32Request;
|
|
423
|
-
readonly O: typeof AddressFromBech32Response;
|
|
424
|
-
readonly kind: MethodKind.Unary;
|
|
425
|
-
};
|
|
426
|
-
/**
|
|
427
|
-
* Convert a mnemonic (as in CreateAccount) to a byte array address.
|
|
428
|
-
*
|
|
429
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromMnemonic
|
|
430
|
-
*/
|
|
431
|
-
readonly addressFromMnemonic: {
|
|
432
|
-
readonly name: "AddressFromMnemonic";
|
|
433
|
-
readonly I: typeof AddressFromMnemonicRequest;
|
|
434
|
-
readonly O: typeof AddressFromMnemonicResponse;
|
|
435
|
-
readonly kind: MethodKind.Unary;
|
|
436
|
-
};
|
|
437
|
-
/**
|
|
438
|
-
* Hello is for debug purposes
|
|
439
|
-
*
|
|
440
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.Hello
|
|
441
|
-
*/
|
|
442
|
-
readonly hello: {
|
|
443
|
-
readonly name: "Hello";
|
|
444
|
-
readonly I: typeof HelloRequest;
|
|
445
|
-
readonly O: typeof HelloResponse;
|
|
446
|
-
readonly kind: MethodKind.Unary;
|
|
447
|
-
};
|
|
448
|
-
/**
|
|
449
|
-
* HelloStream is for debug purposes
|
|
450
|
-
*
|
|
451
|
-
* @generated from rpc land.gno.gnonative.v1.GnoNativeService.HelloStream
|
|
452
|
-
*/
|
|
453
|
-
readonly helloStream: {
|
|
454
|
-
readonly name: "HelloStream";
|
|
455
|
-
readonly I: typeof HelloStreamRequest;
|
|
456
|
-
readonly O: typeof HelloStreamResponse;
|
|
457
|
-
readonly kind: MethodKind.ServerStreaming;
|
|
458
|
-
};
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
//# sourceMappingURL=rpc_connect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_connect.d.ts","sourceRoot":"","sources":["../../../src/api/vendor/rpc_connect.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACn9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;QAGzB;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;;;WAOG;;;;;;;QAOH;;;;;;;WAOG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;;;;WAOG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;;;;WAQG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;;;;;WAQG;;;;;;;QAOH;;;;;;;;;WASG;;;;;;;QAOH;;;;;;;WAOG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;;;;WAOG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;;WAKG;;;;;;;QAOH;;;;;;WAMG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;QAOH;;;;WAIG;;;;;;;;CAQG,CAAC"}
|