@gnolang/gnonative 0.1.2
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/.eslintrc.js +5 -0
- package/.prettierrc.js +12 -0
- package/Makefile +62 -0
- package/README.md +118 -0
- package/android/build.gradle +93 -0
- package/android/libs/gnocore-sources.jar +0 -0
- package/android/libs/gnocore.aar +0 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/land/gno/gnonative/GnonativeModule.kt +150 -0
- package/android/src/main/java/land/gno/gnonative/GnonativeView.kt +7 -0
- package/android/src/main/java/land/gno/gnonative/GoBridgeError.kt +6 -0
- package/android/src/main/java/land/gno/gnonative/JavaPromiseBlock.kt +42 -0
- package/build/Gnonative.types.d.ts +7 -0
- package/build/Gnonative.types.d.ts.map +1 -0
- package/build/Gnonative.types.js +2 -0
- package/build/Gnonative.types.js.map +1 -0
- package/build/GnonativeModule.d.ts +3 -0
- package/build/GnonativeModule.d.ts.map +1 -0
- package/build/GnonativeModule.js +5 -0
- package/build/GnonativeModule.js.map +1 -0
- package/build/GnonativeModule.web.d.ts +7 -0
- package/build/GnonativeModule.web.d.ts.map +1 -0
- package/build/GnonativeModule.web.js +12 -0
- package/build/GnonativeModule.web.js.map +1 -0
- package/build/GnonativeView.d.ts +4 -0
- package/build/GnonativeView.d.ts.map +1 -0
- package/build/GnonativeView.js +7 -0
- package/build/GnonativeView.js.map +1 -0
- package/build/GnonativeView.web.d.ts +4 -0
- package/build/GnonativeView.web.d.ts.map +1 -0
- package/build/GnonativeView.web.js +7 -0
- package/build/GnonativeView.web.js.map +1 -0
- package/build/GoBridge.d.ts +12 -0
- package/build/GoBridge.d.ts.map +1 -0
- package/build/GoBridge.js +27 -0
- package/build/GoBridge.js.map +1 -0
- package/build/grpc/client.d.ts +4 -0
- package/build/grpc/client.d.ts.map +1 -0
- package/build/grpc/client.js +12 -0
- package/build/grpc/client.js.map +1 -0
- package/build/grpc/error.d.ts +15 -0
- package/build/grpc/error.d.ts.map +1 -0
- package/build/grpc/error.js +70 -0
- package/build/grpc/error.js.map +1 -0
- package/build/grpc/transport_native.d.ts +4 -0
- package/build/grpc/transport_native.d.ts.map +1 -0
- package/build/grpc/transport_native.js +140 -0
- package/build/grpc/transport_native.js.map +1 -0
- package/build/hooks/types.d.ts +17 -0
- package/build/hooks/types.d.ts.map +1 -0
- package/build/hooks/types.js +2 -0
- package/build/hooks/types.js.map +1 -0
- package/build/hooks/use-gno.d.ts +35 -0
- package/build/hooks/use-gno.d.ts.map +1 -0
- package/build/hooks/use-gno.js +248 -0
- package/build/hooks/use-gno.js.map +1 -0
- package/build/index.d.ts +9 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +13 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/Frameworks/GnoCore.xcframework/Info.plist +44 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Resources/Info.plist +6 -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/A/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Resources/Info.plist +6 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/Resources/Info.plist +6 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Resources/Info.plist +6 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/A/Resources/Info.plist +6 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/GnoCore +0 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Headers/GnoCore.h +13 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Headers/GnoGnonative.objc.h +93 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Headers/ref.h +35 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Modules/module.modulemap +8 -0
- package/ios/Frameworks/GnoCore.xcframework/ios-arm64_x86_64-simulator/GnoCore.framework/Versions/Current/Resources/Info.plist +6 -0
- package/ios/GnoError.swift +31 -0
- package/ios/Gnonative.podspec +28 -0
- package/ios/GnonativeModule.swift +186 -0
- package/ios/GnonativeView.swift +7 -0
- package/ios/PromiseBlock.swift +45 -0
- package/package.json +50 -0
- package/src/Gnonative.types.ts +7 -0
- package/src/GnonativeModule.ts +5 -0
- package/src/GnonativeModule.web.ts +13 -0
- package/src/GnonativeView.tsx +11 -0
- package/src/GnonativeView.web.tsx +11 -0
- package/src/GoBridge.ts +44 -0
- package/src/grpc/client.ts +14 -0
- package/src/grpc/error.ts +89 -0
- package/src/grpc/transport_native.ts +197 -0
- package/src/hooks/types.ts +19 -0
- package/src/hooks/use-gno.ts +423 -0
- package/src/index.ts +20 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-gno.js","sourceRoot":"","sources":["../../src/hooks/use-gno.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EAEX,oBAAoB,EACpB,oBAAoB,EAEpB,6BAA6B,EAC7B,uBAAuB,EAEvB,iBAAiB,EACjB,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EAEZ,kBAAkB,EAClB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,mBAAmB,EAEnB,YAAY,EAEZ,aAAa,EACb,oBAAoB,EAEpB,WAAW,EAEX,iBAAiB,EAEjB,kBAAkB,EAElB,gBAAgB,GAEjB,MAAM,sDAAsD,CAAC;AAK9D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAyDvC,IAAI,cAAc,GAAuD,SAAS,CAAC;AACnF,IAAI,cAAc,GAAY,KAAK,CA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,EAAE,IAAY,EAAE,EAAE;QACzC,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,OAAO;QACL,UAAU;QACV,WAAW;QACX,SAAS;QACT,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,sBAAsB;QACtB,WAAW;QACX,YAAY;QACZ,eAAe;QACf,qBAAqB;QACrB,gBAAgB;QAChB,mBAAmB;QACnB,yBAAyB;QACzB,aAAa;QACb,WAAW;QACX,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,KAAK;QACL,MAAM;QACN,KAAK;QACL,IAAI;QACJ,IAAI;QACJ,eAAe;QACf,iBAAiB;QACjB,QAAQ;QACR,KAAK;QACL,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n AddressFromBech32Request,\n AddressToBech32Request,\n CallRequest,\n CallResponse,\n CreateAccountRequest,\n DeleteAccountRequest,\n DeleteAccountResponse,\n GenerateRecoveryPhraseRequest,\n GetActiveAccountRequest,\n GetActiveAccountResponse,\n GetChainIDRequest,\n GetKeyInfoByAddressRequest,\n GetKeyInfoByNameOrAddressRequest,\n GetKeyInfoByNameRequest,\n GetRemoteRequest,\n HasKeyByAddressRequest,\n HasKeyByNameOrAddressRequest,\n HasKeyByNameRequest,\n HelloRequest,\n HelloStreamResponse,\n ListKeyInfoRequest,\n MsgCall,\n MsgSend,\n QEvalRequest,\n QueryAccountRequest,\n QueryAccountResponse,\n QueryRequest,\n QueryResponse,\n RenderRequest,\n SelectAccountRequest,\n SelectAccountResponse,\n SendRequest,\n SendResponse,\n SetChainIDRequest,\n SetChainIDResponse,\n SetPasswordRequest,\n SetPasswordResponse,\n SetRemoteRequest,\n SetRemoteResponse,\n} from '@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb';\nimport { GnoNativeService } from '@buf/gnolang_gnonative.connectrpc_es/rpc_connect';\nimport { PromiseClient } from '@connectrpc/connect';\n\nimport { GnoAccount } from './types';\nimport { GoBridge } from '../GoBridge';\nimport * as Grpc from '../grpc/client';\n\nexport interface GnoResponse {\n setRemote: (remote: string) => Promise<SetRemoteResponse>;\n getRemote: () => Promise<string>;\n setChainID: (chainId: string) => Promise<SetChainIDResponse>;\n getChainID: () => Promise<string>;\n createAccount: (\n nameOrBech32: string,\n mnemonic: string,\n password: string,\n ) => Promise<GnoAccount | undefined>;\n generateRecoveryPhrase: () => Promise<string>;\n listKeyInfo: () => Promise<GnoAccount[]>;\n hasKeyByName: (name: string) => Promise<boolean>;\n hasKeyByAddress: (address: Uint8Array) => Promise<boolean>;\n hasKeyByNameOrAddress: (nameOrBech32: string) => Promise<boolean>;\n getKeyInfoByName: (name: string) => Promise<GnoAccount | undefined>;\n getKeyInfoByAddress: (address: Uint8Array) => Promise<GnoAccount | undefined>;\n getKeyInfoByNameOrAddress: (nameOrBech32: string) => Promise<GnoAccount | undefined>;\n selectAccount: (nameOrBech32: string) => Promise<SelectAccountResponse>;\n setPassword: (password: string) => Promise<SetPasswordResponse>;\n getActiveAccount: () => Promise<GetActiveAccountResponse>;\n queryAccount: (address: Uint8Array) => Promise<QueryAccountResponse>;\n deleteAccount: (\n nameOrBech32: string,\n password: string | undefined,\n skipPassword: boolean,\n ) => Promise<DeleteAccountResponse>;\n query: (path: string, data: Uint8Array) => Promise<QueryResponse>;\n render: (packagePath: string, args: string) => Promise<string>;\n qEval: (packagePath: string, expression: string) => Promise<string>;\n call: (\n packagePath: string,\n fnc: string,\n args: Array<string>,\n gasFee: string,\n gasWanted: number,\n send?: string,\n memo?: string,\n ) => Promise<AsyncIterable<CallResponse>>;\n send: (\n toAddress: Uint8Array,\n send: string,\n gasFee: string,\n gasWanted: number,\n memo?: string,\n ) => Promise<AsyncIterable<SendResponse>>;\n addressToBech32: (address: Uint8Array) => Promise<string>;\n addressFromBech32: (bech32Address: string) => Promise<Uint8Array>;\n closeBridge: () => Promise<void>;\n initBridge: () => Promise<void>;\n // debug\n hello: (name: string) => Promise<string>;\n helloStream: (name: string) => Promise<AsyncIterable<HelloStreamResponse>>;\n}\n\nlet clientInstance: PromiseClient<typeof GnoNativeService> | undefined = undefined;\nlet bridgeInstance: boolean = false;\n\nexport const useGno = (): GnoResponse => {\n const getClient = async () => {\n if (!bridgeInstance) {\n await initBridge();\n }\n\n if (clientInstance) return clientInstance;\n\n console.log('Creating GRPC client instance...');\n\n const port = await GoBridge.getTcpPort();\n clientInstance = Grpc.createClient(port);\n\n console.log('Creating GRPC client instance... done.');\n\n // Set the initial configuration where it's different from the default.\n await clientInstance.setRemote(new SetRemoteRequest({ remote: 'gno.land:26657' }));\n await clientInstance.setChainID(new SetChainIDRequest({ chainId: 'portal-loop' }));\n\n return clientInstance;\n };\n\n const closeBridge = async () => {\n if (bridgeInstance) {\n console.log('Closing bridge...');\n await GoBridge.closeBridge();\n console.log('Bridge closed.');\n bridgeInstance = false;\n }\n };\n\n const initBridge = async () => {\n if (!bridgeInstance) {\n console.log('Initializing bridge...');\n await GoBridge.initBridge();\n console.log('Bridge initialized.');\n bridgeInstance = true;\n }\n };\n\n const setRemote = async (remote: string) => {\n const client = await getClient();\n const response = await client.setRemote(new SetRemoteRequest({ remote }));\n return response;\n };\n\n const getRemote = async () => {\n const client = await getClient();\n const response = await client.getRemote(new GetRemoteRequest());\n return response.remote;\n };\n\n const setChainID = async (chainId: string) => {\n const client = await getClient();\n const response = await client.setChainID(new SetChainIDRequest({ chainId }));\n return response;\n };\n\n const getChainID = async () => {\n const client = await getClient();\n const response = await client.getChainID(new GetChainIDRequest());\n return response.chainId;\n };\n\n const createAccount = async (nameOrBech32: string, mnemonic: string, password: string) => {\n const client = await getClient();\n const reponse = await client.createAccount(\n new CreateAccountRequest({\n nameOrBech32,\n mnemonic,\n password,\n }),\n );\n return reponse.key;\n };\n\n const generateRecoveryPhrase = async () => {\n const client = await getClient();\n const response = await client.generateRecoveryPhrase(new GenerateRecoveryPhraseRequest());\n return response.phrase;\n };\n\n const hasKeyByName = async (name: string) => {\n const client = await getClient();\n const response = await client.hasKeyByName(new HasKeyByNameRequest({ name }));\n return response.has;\n };\n\n const hasKeyByAddress = async (address: Uint8Array) => {\n const client = await getClient();\n const response = await client.hasKeyByAddress(new HasKeyByAddressRequest({ address }));\n return response.has;\n };\n\n const hasKeyByNameOrAddress = async (nameOrBech32: string) => {\n const client = await getClient();\n const response = await client.hasKeyByNameOrAddress(\n new HasKeyByNameOrAddressRequest({ nameOrBech32 }),\n );\n return response.has;\n };\n\n const getKeyInfoByName = async (name: string) => {\n const client = await getClient();\n const response = await client.getKeyInfoByName(new GetKeyInfoByNameRequest({ name }));\n return response.key;\n };\n\n const getKeyInfoByAddress = async (address: Uint8Array) => {\n const client = await getClient();\n const response = await client.getKeyInfoByAddress(new GetKeyInfoByAddressRequest({ address }));\n return response.key;\n };\n\n const getKeyInfoByNameOrAddress = async (nameOrBech32: string) => {\n const client = await getClient();\n const response = await client.getKeyInfoByNameOrAddress(\n new GetKeyInfoByNameOrAddressRequest({ nameOrBech32 }),\n );\n return response.key;\n };\n\n const listKeyInfo = async () => {\n const client = await getClient();\n const response = await client.listKeyInfo(new ListKeyInfoRequest());\n return response.keys;\n };\n\n const selectAccount = async (nameOrBech32: string) => {\n const client = await getClient();\n const response = await client.selectAccount(\n new SelectAccountRequest({\n nameOrBech32,\n }),\n );\n return response;\n };\n\n const setPassword = async (password: string) => {\n const client = await getClient();\n const response = await client.setPassword(new SetPasswordRequest({ password }));\n return response;\n };\n\n const getActiveAccount = async () => {\n const client = await getClient();\n const response = await client.getActiveAccount(new GetActiveAccountRequest());\n return response;\n };\n\n const queryAccount = async (address: Uint8Array) => {\n const client = await getClient();\n const reponse = await client.queryAccount(new QueryAccountRequest({ address }));\n return reponse;\n };\n\n const deleteAccount = async (\n nameOrBech32: string,\n password: string | undefined,\n skipPassword: boolean,\n ) => {\n const client = await getClient();\n const response = await client.deleteAccount(\n new DeleteAccountRequest({\n nameOrBech32,\n password,\n skipPassword,\n }),\n );\n return response;\n };\n\n const query = async (path: string, data: Uint8Array) => {\n const client = await getClient();\n const reponse = await client.query(\n new QueryRequest({\n path,\n data,\n }),\n );\n return reponse;\n };\n\n const render = async (packagePath: string, args: string) => {\n const client = await getClient();\n const reponse = await client.render(\n new RenderRequest({\n packagePath,\n args,\n }),\n );\n return reponse.result;\n };\n\n const qEval = async (packagePath: string, expression: string) => {\n const client = await getClient();\n const reponse = await client.qEval(\n new QEvalRequest({\n packagePath,\n expression,\n }),\n );\n return reponse.result;\n };\n\n const call = async (\n packagePath: string,\n fnc: string,\n args: Array<string>,\n gasFee: string,\n gasWanted: number,\n send?: string,\n memo?: string,\n ) => {\n const client = await getClient();\n const reponse = client.call(\n new CallRequest({\n gasFee,\n gasWanted: BigInt(gasWanted),\n memo,\n msgs: [\n new MsgCall({\n packagePath,\n fnc,\n args,\n send,\n }),\n ],\n }),\n );\n return reponse;\n };\n\n const send = async (\n toAddress: Uint8Array,\n send: string,\n gasFee: string,\n gasWanted: number,\n memo?: string,\n ) => {\n const client = await getClient();\n const reponse = client.send(\n new SendRequest({\n gasFee,\n gasWanted: BigInt(gasWanted),\n memo,\n msgs: [\n new MsgSend({\n toAddress,\n send,\n }),\n ],\n }),\n );\n return reponse;\n };\n\n const addressToBech32 = async (address: Uint8Array) => {\n const client = await getClient();\n const response = await client.addressToBech32(new AddressToBech32Request({ address }));\n return response.bech32Address;\n };\n\n const addressFromBech32 = async (bech32Address: string) => {\n const client = await getClient();\n const response = await client.addressFromBech32(\n new AddressFromBech32Request({ bech32Address }),\n );\n return response.address;\n };\n\n // debug\n const hello = async (name: string) => {\n const client = await getClient();\n const response = await client.hello(new HelloRequest({ name }));\n return response.greeting;\n };\n\n // debug\n const helloStream = async (name: string) => {\n const client = await getClient();\n return client.helloStream(new HelloRequest({ name }));\n };\n\n return {\n initBridge,\n closeBridge,\n setRemote,\n getRemote,\n setChainID,\n getChainID,\n createAccount,\n generateRecoveryPhrase,\n listKeyInfo,\n hasKeyByName,\n hasKeyByAddress,\n hasKeyByNameOrAddress,\n getKeyInfoByName,\n getKeyInfoByAddress,\n getKeyInfoByNameOrAddress,\n selectAccount,\n setPassword,\n getActiveAccount,\n queryAccount,\n deleteAccount,\n query,\n render,\n qEval,\n call,\n send,\n addressToBech32,\n addressFromBech32,\n // debug\n hello,\n helloStream,\n };\n};\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Subscription } from 'expo-modules-core';
|
|
2
|
+
import { ChangeEventPayload, GnonativeViewProps } from './Gnonative.types';
|
|
3
|
+
import GnonativeView from './GnonativeView';
|
|
4
|
+
import 'fast-text-encoding';
|
|
5
|
+
export declare function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription;
|
|
6
|
+
export { ChangeEventPayload, GnonativeView, GnonativeViewProps };
|
|
7
|
+
export { useGno } from './hooks/use-gno';
|
|
8
|
+
export * from '@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAInF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAM5B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,GAAG,YAAY,CAE7F;AAED,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,cAAc,sDAAsD,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventEmitter, NativeModulesProxy } from 'expo-modules-core';
|
|
2
|
+
import GnonativeModule from './GnonativeModule';
|
|
3
|
+
import GnonativeView from './GnonativeView';
|
|
4
|
+
import 'fast-text-encoding';
|
|
5
|
+
Symbol.asyncIterator = Symbol.asyncIterator || Symbol.for('Symbol.asyncIterator');
|
|
6
|
+
const emitter = new EventEmitter(GnonativeModule ?? NativeModulesProxy.Gnonative);
|
|
7
|
+
export function addChangeListener(listener) {
|
|
8
|
+
return emitter.addListener('onChange', listener);
|
|
9
|
+
}
|
|
10
|
+
export { GnonativeView };
|
|
11
|
+
export { useGno } from './hooks/use-gno';
|
|
12
|
+
export * from '@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAgB,MAAM,mBAAmB,CAAC;AAKnF,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAE3B,MAAc,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAE3F,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,eAAe,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAElF,MAAM,UAAU,iBAAiB,CAAC,QAA6C;IAC7E,OAAO,OAAO,CAAC,WAAW,CAAqB,UAAU,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED,OAAO,EAAsB,aAAa,EAAsB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,cAAc,sDAAsD,CAAC","sourcesContent":["import { EventEmitter, NativeModulesProxy, Subscription } from 'expo-modules-core';\n\n// Import the native module. On web, it will be resolved to Gnonative.web.ts\n// and on native platforms to Gnonative.ts\nimport { ChangeEventPayload, GnonativeViewProps } from './Gnonative.types';\nimport GnonativeModule from './GnonativeModule';\nimport GnonativeView from './GnonativeView';\nimport 'fast-text-encoding';\n\n(Symbol as any).asyncIterator = Symbol.asyncIterator || Symbol.for('Symbol.asyncIterator');\n\nconst emitter = new EventEmitter(GnonativeModule ?? NativeModulesProxy.Gnonative);\n\nexport function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription {\n return emitter.addListener<ChangeEventPayload>('onChange', listener);\n}\n\nexport { ChangeEventPayload, GnonativeView, GnonativeViewProps };\nexport { useGno } from './hooks/use-gno';\nexport * from '@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb';\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>AvailableLibraries</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>GnoCore.framework/Versions/A/GnoCore</string>
|
|
10
|
+
<key>LibraryIdentifier</key>
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
|
+
<key>LibraryPath</key>
|
|
13
|
+
<string>GnoCore.framework</string>
|
|
14
|
+
<key>SupportedArchitectures</key>
|
|
15
|
+
<array>
|
|
16
|
+
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
18
|
+
</array>
|
|
19
|
+
<key>SupportedPlatform</key>
|
|
20
|
+
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
23
|
+
</dict>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>BinaryPath</key>
|
|
26
|
+
<string>GnoCore.framework/Versions/A/GnoCore</string>
|
|
27
|
+
<key>LibraryIdentifier</key>
|
|
28
|
+
<string>ios-arm64</string>
|
|
29
|
+
<key>LibraryPath</key>
|
|
30
|
+
<string>GnoCore.framework</string>
|
|
31
|
+
<key>SupportedArchitectures</key>
|
|
32
|
+
<array>
|
|
33
|
+
<string>arm64</string>
|
|
34
|
+
</array>
|
|
35
|
+
<key>SupportedPlatform</key>
|
|
36
|
+
<string>ios</string>
|
|
37
|
+
</dict>
|
|
38
|
+
</array>
|
|
39
|
+
<key>CFBundlePackageType</key>
|
|
40
|
+
<string>XFWK</string>
|
|
41
|
+
<key>XCFrameworkFormatVersion</key>
|
|
42
|
+
<string>1.0</string>
|
|
43
|
+
</dict>
|
|
44
|
+
</plist>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
// Objective-C API for talking to the following Go packages
|
|
3
|
+
//
|
|
4
|
+
// github.com/gnolang/gnonative/framework/service
|
|
5
|
+
//
|
|
6
|
+
// File is generated by gomobile bind. Do not edit.
|
|
7
|
+
#ifndef __GnoCore_FRAMEWORK_H__
|
|
8
|
+
#define __GnoCore_FRAMEWORK_H__
|
|
9
|
+
|
|
10
|
+
#include "GnoGnonative.objc.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
#endif
|
package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/GnoGnonative.objc.h
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Objective-C API for talking to github.com/gnolang/gnonative/framework/service Go package.
|
|
2
|
+
// gobind -lang=objc -prefix="Gno" github.com/gnolang/gnonative/framework/service
|
|
3
|
+
//
|
|
4
|
+
// File is generated by gobind. Do not edit.
|
|
5
|
+
|
|
6
|
+
#ifndef __GnoGnonative_H__
|
|
7
|
+
#define __GnoGnonative_H__
|
|
8
|
+
|
|
9
|
+
@import Foundation;
|
|
10
|
+
#include "ref.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@class GnoGnonativeBridge;
|
|
15
|
+
@class GnoGnonativeBridgeConfig;
|
|
16
|
+
@protocol GnoGnonativePromiseBlock;
|
|
17
|
+
@class GnoGnonativePromiseBlock;
|
|
18
|
+
@protocol GnoGnonativeServiceClient;
|
|
19
|
+
@class GnoGnonativeServiceClient;
|
|
20
|
+
|
|
21
|
+
@protocol GnoGnonativePromiseBlock <NSObject>
|
|
22
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
23
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@protocol GnoGnonativeServiceClient <NSObject>
|
|
27
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
28
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
29
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
30
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
@interface GnoGnonativeBridge : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
34
|
+
}
|
|
35
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
36
|
+
|
|
37
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
38
|
+
- (nullable instancetype)init:(GnoGnonativeBridgeConfig* _Nullable)config;
|
|
39
|
+
@property (nonatomic) id<GnoGnonativeServiceClient> _Nullable serviceClient;
|
|
40
|
+
- (BOOL)close:(NSError* _Nullable* _Nullable)error;
|
|
41
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
42
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
43
|
+
- (NSString* _Nonnull)getTcpAddr;
|
|
44
|
+
- (long)getTcpPort;
|
|
45
|
+
- (NSString* _Nonnull)getUDSPath;
|
|
46
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
47
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
48
|
+
@end
|
|
49
|
+
|
|
50
|
+
@interface GnoGnonativeBridgeConfig : NSObject <goSeqRefInterface> {
|
|
51
|
+
}
|
|
52
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
53
|
+
|
|
54
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
55
|
+
- (nullable instancetype)init;
|
|
56
|
+
@property (nonatomic) NSString* _Nonnull rootDir;
|
|
57
|
+
@property (nonatomic) NSString* _Nonnull tmpDir;
|
|
58
|
+
@property (nonatomic) BOOL useTcpListener;
|
|
59
|
+
@property (nonatomic) BOOL disableUdsListener;
|
|
60
|
+
@end
|
|
61
|
+
|
|
62
|
+
FOUNDATION_EXPORT GnoGnonativeBridge* _Nullable GnoGnonativeNewBridge(GnoGnonativeBridgeConfig* _Nullable config, NSError* _Nullable* _Nullable error);
|
|
63
|
+
|
|
64
|
+
FOUNDATION_EXPORT GnoGnonativeBridgeConfig* _Nullable GnoGnonativeNewBridgeConfig(void);
|
|
65
|
+
|
|
66
|
+
// skipped function NewServiceClient with unsupported parameter or return types
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@class GnoGnonativePromiseBlock;
|
|
70
|
+
|
|
71
|
+
@class GnoGnonativeServiceClient;
|
|
72
|
+
|
|
73
|
+
@interface GnoGnonativePromiseBlock : NSObject <goSeqRefInterface, GnoGnonativePromiseBlock> {
|
|
74
|
+
}
|
|
75
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
76
|
+
|
|
77
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
78
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
79
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
80
|
+
@end
|
|
81
|
+
|
|
82
|
+
@interface GnoGnonativeServiceClient : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
83
|
+
}
|
|
84
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
85
|
+
|
|
86
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
87
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
88
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
89
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
90
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
91
|
+
@end
|
|
92
|
+
|
|
93
|
+
#endif
|
package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Headers/Universe.objc.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Objective-C API for talking to Go package.
|
|
2
|
+
// gobind -lang=objc -prefix="Gno"
|
|
3
|
+
//
|
|
4
|
+
// File is generated by gobind. Do not edit.
|
|
5
|
+
|
|
6
|
+
#ifndef __Universe_H__
|
|
7
|
+
#define __Universe_H__
|
|
8
|
+
|
|
9
|
+
@import Foundation;
|
|
10
|
+
#include "ref.h"
|
|
11
|
+
|
|
12
|
+
@protocol Universeerror;
|
|
13
|
+
@class Universeerror;
|
|
14
|
+
|
|
15
|
+
@protocol Universeerror <NSObject>
|
|
16
|
+
- (NSString* _Nonnull)error;
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
@class Universeerror;
|
|
20
|
+
|
|
21
|
+
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
|
22
|
+
}
|
|
23
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
24
|
+
|
|
25
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
26
|
+
- (NSString* _Nonnull)error;
|
|
27
|
+
@end
|
|
28
|
+
|
|
29
|
+
#endif
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2015 The Go Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef __GO_REF_HDR__
|
|
6
|
+
#define __GO_REF_HDR__
|
|
7
|
+
|
|
8
|
+
#include <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
// GoSeqRef is an object tagged with an integer for passing back and
|
|
11
|
+
// forth across the language boundary. A GoSeqRef may represent either
|
|
12
|
+
// an instance of a Go object, or an Objective-C object passed to Go.
|
|
13
|
+
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
|
14
|
+
// when it is passed to Objective-C. The Go seq package maintains a
|
|
15
|
+
// reference to the Go object in a map keyed by the refnum along with
|
|
16
|
+
// a reference count. When the reference count reaches zero, the Go
|
|
17
|
+
// seq package will clear the corresponding entry in the map.
|
|
18
|
+
@interface GoSeqRef : NSObject {
|
|
19
|
+
}
|
|
20
|
+
@property(readonly) int32_t refnum;
|
|
21
|
+
@property(strong) id obj; // NULL when representing a Go object.
|
|
22
|
+
|
|
23
|
+
// new GoSeqRef object to proxy a Go object. The refnum must be
|
|
24
|
+
// provided from Go side.
|
|
25
|
+
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
|
26
|
+
|
|
27
|
+
- (int32_t)incNum;
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
@protocol goSeqRefInterface
|
|
32
|
+
-(GoSeqRef*) _ref;
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
#endif
|
|
Binary file
|
package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Headers/GnoCore.h
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
// Objective-C API for talking to the following Go packages
|
|
3
|
+
//
|
|
4
|
+
// github.com/gnolang/gnonative/framework/service
|
|
5
|
+
//
|
|
6
|
+
// File is generated by gomobile bind. Do not edit.
|
|
7
|
+
#ifndef __GnoCore_FRAMEWORK_H__
|
|
8
|
+
#define __GnoCore_FRAMEWORK_H__
|
|
9
|
+
|
|
10
|
+
#include "GnoGnonative.objc.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
#endif
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Objective-C API for talking to github.com/gnolang/gnonative/framework/service Go package.
|
|
2
|
+
// gobind -lang=objc -prefix="Gno" github.com/gnolang/gnonative/framework/service
|
|
3
|
+
//
|
|
4
|
+
// File is generated by gobind. Do not edit.
|
|
5
|
+
|
|
6
|
+
#ifndef __GnoGnonative_H__
|
|
7
|
+
#define __GnoGnonative_H__
|
|
8
|
+
|
|
9
|
+
@import Foundation;
|
|
10
|
+
#include "ref.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@class GnoGnonativeBridge;
|
|
15
|
+
@class GnoGnonativeBridgeConfig;
|
|
16
|
+
@protocol GnoGnonativePromiseBlock;
|
|
17
|
+
@class GnoGnonativePromiseBlock;
|
|
18
|
+
@protocol GnoGnonativeServiceClient;
|
|
19
|
+
@class GnoGnonativeServiceClient;
|
|
20
|
+
|
|
21
|
+
@protocol GnoGnonativePromiseBlock <NSObject>
|
|
22
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
23
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@protocol GnoGnonativeServiceClient <NSObject>
|
|
27
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
28
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
29
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
30
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
@interface GnoGnonativeBridge : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
34
|
+
}
|
|
35
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
36
|
+
|
|
37
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
38
|
+
- (nullable instancetype)init:(GnoGnonativeBridgeConfig* _Nullable)config;
|
|
39
|
+
@property (nonatomic) id<GnoGnonativeServiceClient> _Nullable serviceClient;
|
|
40
|
+
- (BOOL)close:(NSError* _Nullable* _Nullable)error;
|
|
41
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
42
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
43
|
+
- (NSString* _Nonnull)getTcpAddr;
|
|
44
|
+
- (long)getTcpPort;
|
|
45
|
+
- (NSString* _Nonnull)getUDSPath;
|
|
46
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
47
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
48
|
+
@end
|
|
49
|
+
|
|
50
|
+
@interface GnoGnonativeBridgeConfig : NSObject <goSeqRefInterface> {
|
|
51
|
+
}
|
|
52
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
53
|
+
|
|
54
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
55
|
+
- (nullable instancetype)init;
|
|
56
|
+
@property (nonatomic) NSString* _Nonnull rootDir;
|
|
57
|
+
@property (nonatomic) NSString* _Nonnull tmpDir;
|
|
58
|
+
@property (nonatomic) BOOL useTcpListener;
|
|
59
|
+
@property (nonatomic) BOOL disableUdsListener;
|
|
60
|
+
@end
|
|
61
|
+
|
|
62
|
+
FOUNDATION_EXPORT GnoGnonativeBridge* _Nullable GnoGnonativeNewBridge(GnoGnonativeBridgeConfig* _Nullable config, NSError* _Nullable* _Nullable error);
|
|
63
|
+
|
|
64
|
+
FOUNDATION_EXPORT GnoGnonativeBridgeConfig* _Nullable GnoGnonativeNewBridgeConfig(void);
|
|
65
|
+
|
|
66
|
+
// skipped function NewServiceClient with unsupported parameter or return types
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@class GnoGnonativePromiseBlock;
|
|
70
|
+
|
|
71
|
+
@class GnoGnonativeServiceClient;
|
|
72
|
+
|
|
73
|
+
@interface GnoGnonativePromiseBlock : NSObject <goSeqRefInterface, GnoGnonativePromiseBlock> {
|
|
74
|
+
}
|
|
75
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
76
|
+
|
|
77
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
78
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
79
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
80
|
+
@end
|
|
81
|
+
|
|
82
|
+
@interface GnoGnonativeServiceClient : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
83
|
+
}
|
|
84
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
85
|
+
|
|
86
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
87
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
88
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
89
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
90
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
91
|
+
@end
|
|
92
|
+
|
|
93
|
+
#endif
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Objective-C API for talking to Go package.
|
|
2
|
+
// gobind -lang=objc -prefix="Gno"
|
|
3
|
+
//
|
|
4
|
+
// File is generated by gobind. Do not edit.
|
|
5
|
+
|
|
6
|
+
#ifndef __Universe_H__
|
|
7
|
+
#define __Universe_H__
|
|
8
|
+
|
|
9
|
+
@import Foundation;
|
|
10
|
+
#include "ref.h"
|
|
11
|
+
|
|
12
|
+
@protocol Universeerror;
|
|
13
|
+
@class Universeerror;
|
|
14
|
+
|
|
15
|
+
@protocol Universeerror <NSObject>
|
|
16
|
+
- (NSString* _Nonnull)error;
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
@class Universeerror;
|
|
20
|
+
|
|
21
|
+
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
|
22
|
+
}
|
|
23
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
24
|
+
|
|
25
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
26
|
+
- (NSString* _Nonnull)error;
|
|
27
|
+
@end
|
|
28
|
+
|
|
29
|
+
#endif
|
package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/A/Headers/ref.h
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2015 The Go Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef __GO_REF_HDR__
|
|
6
|
+
#define __GO_REF_HDR__
|
|
7
|
+
|
|
8
|
+
#include <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
// GoSeqRef is an object tagged with an integer for passing back and
|
|
11
|
+
// forth across the language boundary. A GoSeqRef may represent either
|
|
12
|
+
// an instance of a Go object, or an Objective-C object passed to Go.
|
|
13
|
+
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
|
14
|
+
// when it is passed to Objective-C. The Go seq package maintains a
|
|
15
|
+
// reference to the Go object in a map keyed by the refnum along with
|
|
16
|
+
// a reference count. When the reference count reaches zero, the Go
|
|
17
|
+
// seq package will clear the corresponding entry in the map.
|
|
18
|
+
@interface GoSeqRef : NSObject {
|
|
19
|
+
}
|
|
20
|
+
@property(readonly) int32_t refnum;
|
|
21
|
+
@property(strong) id obj; // NULL when representing a Go object.
|
|
22
|
+
|
|
23
|
+
// new GoSeqRef object to proxy a Go object. The refnum must be
|
|
24
|
+
// provided from Go side.
|
|
25
|
+
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
|
26
|
+
|
|
27
|
+
- (int32_t)incNum;
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
@protocol goSeqRefInterface
|
|
32
|
+
-(GoSeqRef*) _ref;
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
#endif
|
package/ios/Frameworks/GnoCore.xcframework/ios-arm64/GnoCore.framework/Versions/Current/GnoCore
ADDED
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
// Objective-C API for talking to the following Go packages
|
|
3
|
+
//
|
|
4
|
+
// github.com/gnolang/gnonative/framework/service
|
|
5
|
+
//
|
|
6
|
+
// File is generated by gomobile bind. Do not edit.
|
|
7
|
+
#ifndef __GnoCore_FRAMEWORK_H__
|
|
8
|
+
#define __GnoCore_FRAMEWORK_H__
|
|
9
|
+
|
|
10
|
+
#include "GnoGnonative.objc.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
#endif
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Objective-C API for talking to github.com/gnolang/gnonative/framework/service Go package.
|
|
2
|
+
// gobind -lang=objc -prefix="Gno" github.com/gnolang/gnonative/framework/service
|
|
3
|
+
//
|
|
4
|
+
// File is generated by gobind. Do not edit.
|
|
5
|
+
|
|
6
|
+
#ifndef __GnoGnonative_H__
|
|
7
|
+
#define __GnoGnonative_H__
|
|
8
|
+
|
|
9
|
+
@import Foundation;
|
|
10
|
+
#include "ref.h"
|
|
11
|
+
#include "Universe.objc.h"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@class GnoGnonativeBridge;
|
|
15
|
+
@class GnoGnonativeBridgeConfig;
|
|
16
|
+
@protocol GnoGnonativePromiseBlock;
|
|
17
|
+
@class GnoGnonativePromiseBlock;
|
|
18
|
+
@protocol GnoGnonativeServiceClient;
|
|
19
|
+
@class GnoGnonativeServiceClient;
|
|
20
|
+
|
|
21
|
+
@protocol GnoGnonativePromiseBlock <NSObject>
|
|
22
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
23
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@protocol GnoGnonativeServiceClient <NSObject>
|
|
27
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
28
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
29
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
30
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
@interface GnoGnonativeBridge : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
34
|
+
}
|
|
35
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
36
|
+
|
|
37
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
38
|
+
- (nullable instancetype)init:(GnoGnonativeBridgeConfig* _Nullable)config;
|
|
39
|
+
@property (nonatomic) id<GnoGnonativeServiceClient> _Nullable serviceClient;
|
|
40
|
+
- (BOOL)close:(NSError* _Nullable* _Nullable)error;
|
|
41
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
42
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
43
|
+
- (NSString* _Nonnull)getTcpAddr;
|
|
44
|
+
- (long)getTcpPort;
|
|
45
|
+
- (NSString* _Nonnull)getUDSPath;
|
|
46
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
47
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
48
|
+
@end
|
|
49
|
+
|
|
50
|
+
@interface GnoGnonativeBridgeConfig : NSObject <goSeqRefInterface> {
|
|
51
|
+
}
|
|
52
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
53
|
+
|
|
54
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
55
|
+
- (nullable instancetype)init;
|
|
56
|
+
@property (nonatomic) NSString* _Nonnull rootDir;
|
|
57
|
+
@property (nonatomic) NSString* _Nonnull tmpDir;
|
|
58
|
+
@property (nonatomic) BOOL useTcpListener;
|
|
59
|
+
@property (nonatomic) BOOL disableUdsListener;
|
|
60
|
+
@end
|
|
61
|
+
|
|
62
|
+
FOUNDATION_EXPORT GnoGnonativeBridge* _Nullable GnoGnonativeNewBridge(GnoGnonativeBridgeConfig* _Nullable config, NSError* _Nullable* _Nullable error);
|
|
63
|
+
|
|
64
|
+
FOUNDATION_EXPORT GnoGnonativeBridgeConfig* _Nullable GnoGnonativeNewBridgeConfig(void);
|
|
65
|
+
|
|
66
|
+
// skipped function NewServiceClient with unsupported parameter or return types
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@class GnoGnonativePromiseBlock;
|
|
70
|
+
|
|
71
|
+
@class GnoGnonativeServiceClient;
|
|
72
|
+
|
|
73
|
+
@interface GnoGnonativePromiseBlock : NSObject <goSeqRefInterface, GnoGnonativePromiseBlock> {
|
|
74
|
+
}
|
|
75
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
76
|
+
|
|
77
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
78
|
+
- (void)callReject:(NSError* _Nullable)error;
|
|
79
|
+
- (void)callResolve:(NSString* _Nullable)reply;
|
|
80
|
+
@end
|
|
81
|
+
|
|
82
|
+
@interface GnoGnonativeServiceClient : NSObject <goSeqRefInterface, GnoGnonativeServiceClient> {
|
|
83
|
+
}
|
|
84
|
+
@property(strong, readonly) _Nonnull id _ref;
|
|
85
|
+
|
|
86
|
+
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
87
|
+
- (void)closeStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
88
|
+
- (void)createStreamClientWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
89
|
+
- (void)invokeGrpcMethodWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise method:(NSString* _Nullable)method jsonMessage:(NSString* _Nullable)jsonMessage;
|
|
90
|
+
- (void)streamClientReceiveWithPromiseBlock:(id<GnoGnonativePromiseBlock> _Nullable)promise id_:(NSString* _Nullable)id_;
|
|
91
|
+
@end
|
|
92
|
+
|
|
93
|
+
#endif
|